Teradata Database Message 5847 - 5847 - Analytics Database - Teradata Vantage
Teradata® VantageCloud Lake - Analytics Database Messages
- Edition
- Lake
- Product
- Analytics Database
- Teradata Vantage
- Published
- October 2022
- Language
- English (United States)
- Last Update
- 2024-02-26
- dita:mapPath
- tzr1629746512312.ditamap
- dita:ditavalPath
- ft:empty
- dita:id
- vza1585613049811
- lifecycle
- latest
- Product Category
- Teradata® Vantage™
- Message
- 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.
- 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