DROP USER Examples | Teradata Vantage - DROP USER Examples - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
ncd1596241368722.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1144
lifecycle
previous
Product Category
Teradata Vantage™

Example: Dropping User, DBQL Case

Suppose the following DBQL rules are in place.

  • Rule 1: ALL users, any account string, default logging only.
  • Rule 2: ALL users with account string 'finance', object logging.
  • Rule 3: user_1, account string 'marketing', step logging.
  • Rule 4: user_1, account string 'HR', default logging only.

You need to drop user_1. Before you can do so, you must first stop query logging explicitly for user 1 so you can remove Rules 3 and 4.

To do this, submit the following requests in the order indicated.

     END QUERY LOGGING ON user_1 ACCOUNT = ('marketing','HR');
     DROP USER user_1;

Example: Dropping User

This request drops user Jones.

     DROP USER Jones;