15.00 - 5847 The database '%VSTR' has tables & triggers in different databases. - Teradata Database

Teradata Database Messages

Product
Teradata Database
Release Number
15.00
Content Type
Programming Reference
Publication ID
B035-1096-015K
Language
English (United States)

5847 The database '%VSTR' has tables & triggers in different databases.

Explanation:

The above error is generated when a user submits a DELETE DATABASE command that contains : 1.Tables with triggers defined in some other database. 2.Triggers that has reference to a table in other database. If the DELETE DATABASE were successfully executed, it would cause Orphan triggers for first case or would results in bogus triggercount in tvm rows (second case). In order to avoid above problems, 1.Prevent the deletion of any database whose table(s) has one or more triggers defined on it and trigger's database is not same as the database to be deleted. 2.Prevent the deletion of any database whose trigger(s) has a reference to table and table database is not same as the database to be deleted. <- DR120132-gs185064-01

Generated By:

RES, OPD modules(opddeldb)

For Whom:

End User or Field Engineer or the concerned site support Representative.

Notes:

Find all the triggers that are defined on the tables in the database being deleted by using the following command: SELECT dbase.databasename , triggerstbl.triggername WHERE triggerstbl.SubjectDbId = <DBID>; where <DBID> is the database id of the database being deleted. The database id of the "database being deleted" can be obtained using the following command: SELECT dbase.databaseid WHERE dbase.databasename = <DBName>; where <DBName> is the database name of the database being deleted.

Remedy:

Drop all triggers from the above list and then execute the DELETE DATABASE command