Subject RE: [firebird-support] Re: Self Reference Error? Bug? Still Getting it
Author Thomas Steinmaurer
> Actually, I was connected to the database from an EMS IB Manager
> client while trying to execute this. When I closed the IB Manager
> client and tried it again, it worked.
>
> So, if you have a jdbc connection pool, and try to create the foreign
> key from a jdbc connection, does this mean it will fail if there are
> other open jdbc connections?

If there is any other connection, yes, creating a FOREIGN KEY will fail.

Personally, I wouldn't mess around with DDLs if the database is in use,
so you might have to plan a down-time for database maintenance. You could
shutdown the database, so that only SYSDBA or the database owner can
connect to the database, but that doesn't prevent that two SYSDBA connections
happen, for example.

Well, usually, I rename the database to be sure that no one is able
to connect to the database from a client application, because the
path the database is simply wrong then. Then I'm doing any DB
maintenance tasks, and rename the database back to its initial file
name.


> Is there any workaround or planned
> further fixes for this?

See above for a possible howto/workaround. Can't say if there
is something on the wish list for Firebird 2.0, but if that is
critical for you, then you might consider funding that task
via the FirebirdSQL Foundation.
http://www.firebirdsql.org/ff/foundation


HTH,
Thomas Steinmaurer

Logging/Auditing Suite for InterBase and Firebird
http://www.iblogmanager.com
Logging/Auditing Suite for Advantage Database Server
http://www.adslogmanager.com