DELETE DATABASE and SQL UDFs - 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
2023-07-11
dita:mapPath
vuk1628111288877.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1184
lifecycle
latest
Product Category
Teradata Vantage™

A DELETE DATABASE statement deletes all the database objects contained in the database. If database objects contained within other databases or users reference any of the deleted objects, the referencing objects are no longer valid.

An SQL UDF can reference different database objects in its definition, including UDTs. It is always possible that such objects might be dropped either individually, or collectively when you submit a DELETE DATABASE request. When this happens, it can invalidate the UDF. Conversely, an SQL UDF can itself be referenced by various database objects. If an SQL UDF in such a relationship is dropped, or if its containing database or user is dropped, those database objects then lose their validity.

For example, suppose you have database df2 that contains a table referenced by an SQL UDF in database pls, and for some reason you decide to delete the contents of df2. The next time a request references the affected SQL UDF, the system aborts the request and returns an error to the requestor.