Subject | RE: [firebird-support] Re: "object XXX is in use" error for newly created table |
---|---|
Author | Alan McDonald |
Post date | 2006-12-21T21:19:46Z |
> > Terry wrote:you don't have to drop all connections but you do have to ensure that there
> > > I have a production Firebird 1.5 database that has been serving me
> > > very well for a few years now. I'm adding some new stuff to it.
> > >
> > > I added some fields to the main table, called COMPLAINTS, then created
> > > a new table called TI_LOCATIONS. After creating and populating this
> > > table, I added another field to COMPLAINTS to reference TI_LOCATIONS,
> > > called TI_LOC_ID.
> > >
> > > When I try to add a contraint to COMPLAINTS, making TI_LOC_ID a
> > > foreign key to TI_LOCATIONS, I receive an "object TI_LOCATIONS is in
> > > use" error.
> > >
> > > I have closed everything in IB_Expert that had anything to do with
> > > this new table, and the client application is absolutely not even
> > > aware that it exists yet. How can it be "in use"? This is driving me
> > > nuts!
> > >
> > > Thanks for any help.
> > >
> > > -Terry
> > >
> >
> > Close ALL client connections.
> >
> > see you !
> >
> > --
> > Alexandre Benson Smith
>
> I shouldn't HAVE to close all connections just to add a foreign key
> restraint! Someone tell me this isn't Standard Procedure for FB?
>
> -Terry
a no active transactions running against the 2 tables.
That's pretty difficult so closing all connections is easier, even if it's
just for the few seconds you need to run the script.
There are quite a few things you need to do to live DBs which need sole
possession. e.g. once yearly backup/restore.
Alan