How to Drop a Populated User | DROP USER Statement | Teradata Vantage - Dropping a Populated User - Analytics Database - Teradata Vantage

SQL Data Definition Language Detailed Topics

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
jbg1472252759029
lifecycle
latest
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 and DROP ROLE in Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144
  5. Drop the current user.