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.00
Published
September 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
wgr1555383704548.ditamap
dita:ditavalPath
lze1555437562152.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;