Subject Re: [firebird-support] Unsuccessful metadata update
Author Tomasz Tyrakowski
Hi Peter,

IMHO, one of your DROP TABLE statements causes the "object xxx is in
use" error. Copying data from one table to another doesn't touch the
metadata (for the purists: OK, it may do that, if you have trigger on
the target table, which executes DDL via EXECUTE STATEMENT, which is a
_very_ rare phenomenon).

My advice:

1. Check the dependencies for the tables being dropped:
select * from RDB$DEPENDENCIES where
RDB$DEPENDED_ON_NAME='name_of_the_table_to_drop'

2. Make sure you COMMIT after copying data and before dropping the
source table(s) (especially if you copy via INSERT ... SELECT ...
statemens).

3. Make sure yours is the only open connection to the database (i.e.
there are no other connections with cached metadata).

regards
Tomasz Tyrakowski
SOL-System
Poznan, Poland

W dniu 2011-10-03 08:26, Peter Bailey pisze:
> G'day all
>
> I am attempting to develop a script to
> create a new table,
> copy data to the new table from the old table and then
> delete the old table.
> The script is to be executed from within a Delphi 2007 program using
> IBX, (2007), components and operating under Windows 7 Home Premium.
> Firebird version is 2.5.0.26074.
>
> The script was modelled on another script doing a similar job, which
> worked successfully under Windows Vista, (which may or may not be relevant).
>
> When I run the script I get the following error message:
> Project Umpires.exe raised exception class EIBInterBaseError with message
> 'unsuccessful metadata update object UMPIRECLUBLINKS is in use'.
>
> This message is not too meaningful to me!
>
> The error is triggered by the copy statement and this statement is the
> first reference in the script to UMPIRECLUBLINKS. The script has a
> "liberal" number of COMMIT statements, especially at the end of each of
> the major sections.
>
> Run separately, each of the three major sections works just fine.
>
> Any help in fixing this script will be most welcome.
> Cheers
> Peter
>


--
__--==============================--__
__--== Tomasz Tyrakowski ==--__
__--== SOL-SYSTEM ==--__
__--== http://www.sol-system.pl ==--__
__--==============================--__