Subject Re: [firebird-support] Cannot drop table...
Author Helen Borrie
At 11:55 PM 23/11/2004 +0000, you wrote:


>Hello when I try to drop a test table, I get the following error message:
>
>-cannot delete
>-TABLE PERSON
>-there are 1 dependencies
>
>How do I find out which dependency that is?
>
>I did a SHOW TABLE PERSON; but this didn't reveal anything (simply
>showed the table structure). I had a trigger attached to that table,
>but I have already dropped that as well.
>
>What am I missing here?

1. Use SHOW TRIGGERS to find all of the trigger dependences.
2. Use SHOW PROCEDURES to look for table references.
3. SHOW TABLES will show the FK and CHECK constraints.

Dropping a dependent trigger or procedure doesn't always cause the object
to be dropped immediately (and thus release the dependency). If the
procedure or trigger was invoked at all since the last time the database
was shut down, it will have been cached. The actual "drop" of the proc or
trigger will be deferred and won't occur until the last transaction is
completed and the last user logs out.

The lesson is: don't fiddle about with dependencies when users are doing
stuff. At best it will be frustrating; at worst, your human perception of
database state might be quite different to the engine's perception.

./heLen