Drop a Database or User | Teradata Vantage - 17.00 - 17.05 - Dropping a Database or User - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - Database Administration

Product
Advanced SQL Engine
Teradata Database
Release Number
17.00
17.05
Published
June 2020
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
rgu1556127906220.ditamap
dita:ditavalPath
lze1555437562152.ditaval

Dropping a database or user is a two-step process:

  1. Delete all database objects from the specified database or user. For example:
    DELETE DATABASE used_cars ALL;

    or

    DELETE USER marco ALL;
  2. Drop the empty database or user. For example:
    DROP DATABASE used_cars;

    or

    DROP USER marco;

If a journal table exists, first be sure that no data table references it. Then remove it. For example:

MODIFY DATABASE used_cars AS DROP DEFAULT JOURNAL TABLE;

For the syntax and more examples, see Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.

The database or user permanent space that the drop makes available is added to the permanent space of the immediate owner database or user.

All physical database maintenance is performed automatically. You do not need to restructure or reorganize a database to reuse space. Some physical database maintenance activities required by other database systems (such as eliminating pointer chains and reorganizations) do not apply to Vantage.