trigger doesn't appear in schema
Posted in 2000
Topics: Triggers, Constraints & Referential Integrity
Hi all,
I've discovered at least one trigger for a table
in my database that does not appear in a dbschema,
nor in systriggers, but the trigger functions.
This is a cause for concern because its a 7.23UC1
and I am upgrading to a 7.31FC4.
Has anybody encountered this before? The scary
part is I don't know if there are more triggers
in my database with the same problem.
Thanks,
Todd
Sent via Deja.com http://www.deja.com/
Before you buy.
toddroy@my-deja.com wrote:
>
> Hi all,
>
> I've discovered at least one trigger for a table
> in my database that does not appear in a dbschema,
> nor in systriggers, but the trigger functions.
>
> This is a cause for concern because its a 7.23UC1
> and I am upgrading to a 7.31FC4.
>
> Has anybody encountered this before? The scary
> part is I don't know if there are more triggers
> in my database with the same problem.
If the trigger is not in systriggers and dbschema does not report it, how
do you know that the trigger is firing at all? Is there an orphaned row(s)
in systrigbody which is where the actual code of the trigger lives? In
effect does the following SQL statement series report anything:
SELECT trigname, b.trigid
FROM systriggers a, OUTER systrigbody b
WHERE a.trigid = b.trigid
INTO TEMP fred;
SELECT trigid
FROM fred
WHERE trigname IS NULL;
Also what does oncheck -cc <databasename> report?
If there is an orphaned systrigbody row you can extract the text of the
trigger with:
SELECT *
FROM systrigbody
WHERE trigid = <orphaned trigid>
AND datakey IN ('D','A')
ORDER BY trigid, datakey desc;
Then unload the table, get a schema, drop and recreate the table and recreate
the missing trigger(s) then reload the data.
Art S. Kagel