Subject Re: help: reactivate indexes after gbak -inactive
Author Adam
--- In firebird-support@yahoogroups.com, "elleffeci"
<l.finzicontini@...> wrote:
>
>
> >
> > You need exclusive access to make these changes. You must have an open
> > transaction somewhere.
> >
> > Adam
> >
> Great, Adam,
> my open ISQL session was the problem! It was the 'open transaction'. I
> closed it and continued working.
> I got the problem:
> it was a row in table DR that had the foreign key that held a value,
> say 5, that did not exist in table DT as a key.
> You may wonder why this could happen... well, it's not so uncommon !
> Don't know if it is my app or FB1.0 (btw this DB has forced writes =
> OFF :( ) ,
> but I did the following:
> - removed the 'wrong' row in table DR,
> - double checked its removal,
> - gbak'd the DB,
> - restored the DB --> restore OK.
> Thanks, Adam!
> Luca.
>

I can't answer how it happenned. There may have been a bug at some
stage, but I am yet to experience it. This will be the reason it
wouldn't restore normally though. When it tried to activate the
foreign key index, it would notice this record and freak out.

Oh, and turn on forced writes ;)

Adam