Subject Re: [firebird-support] Metadata update - table in use problem
Author Martijn Tonies
Hello,

> I'm using Firebird 1.5.2
> I try to issue the following command
>
> alter table DIORTHOTIKO
> add constraint FK_DIORTHOTIKO_1
> foreign key (ETOS_PROT,SEIRA_PROT,AR_PROT)
> references BOOK(ETOS,SEIRA,AR_PROT)
>
>
> and I get the error message
>
> This operation is not defined for system tables.
> unsuccessful metadata update.
> object BOOK is in use .
>
> Only SYSDBA is connected to the database.

Sure, but how many times?

To create a foreign key, there can be only 1 connection
to a database.

> I have extracted metadata to a script from the database
> and create a new database from the script.
> Then I export the data from the first database
> and import the data to the second database.
>
> To the second database I can issue the command
> alter table with no problem.

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server
Upscene Productions
http://www.upscene.com