How to Drop a Populated User | DROP USER Statement | Teradata Vantage - Dropping a Populated User - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Detailed Topics

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
jpx1556733107962.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1184
lifecycle
previous
Product Category
Teradata Vantage™

A user must not contain any database objects or you cannot drop it. In other words, you cannot drop a populated user. Complete the following procedure to ensure that a user is empty before you attempt to drop it.

  1. Drop any hash and join indexes in another database or user that reference a table in the current user. See DROP HASH INDEX  and DROP JOIN INDEX.
  2. Drop any triggers in another database or user that reference a table in the current user. See DROP MACRO.
  3. Drop any journal tables in the current user. See MODIFY USER.
  4. Perform either of the following procedures:
    • Delete the current user. See DELETE USER.
    • Drop all the objects within the current user.
      See the appropriate statement set from the following list for more information:
      • DROP FUNCTION
      • DROP INDEX
      • "DROP PROFILE" in Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144
      • "DROP ROLE" in Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144
  5. Drop the current user.