Subject | Re: Index error |
---|---|
Author | rodbracher |
Post date | 2004-02-02T15:26:39Z |
I had this a lot in interbase v6.x. The 'Master' relation did not
have it's key record ( this should not have been possible ) - once
found ( Select * from tb2 where tb2.key_field not in tb1 ) delete it -
restore FK constraints.
There was a classic case of triggers inserting before checking FK
constraints. This has been fixed in Firebird.
In FB 1.0.3 I have never seen this situation again.
Rod
--- In firebird-support@yahoogroups.com, "Michael Vilhelmsen"
<Michael.Vilhelmsen@M...> wrote:
have it's key record ( this should not have been possible ) - once
found ( Select * from tb2 where tb2.key_field not in tb1 ) delete it -
restore FK constraints.
There was a classic case of triggers inserting before checking FK
constraints. This has been fixed in Firebird.
In FB 1.0.3 I have never seen this situation again.
Rod
--- In firebird-support@yahoogroups.com, "Michael Vilhelmsen"
<Michael.Vilhelmsen@M...> wrote:
> Hiresearch
>
> Please ignore my earlier posting today regarding GBak error.
> I'll do a bit more explaining here.
>
> I have a Backup file from a customer.
> The originally
> DB is up and running and has been for quite some time.
> Each night we are making a backup with GBak.
>
> I just took hold of the backup file this morning to do some
> in the data locally.
>
> I can ONLY restore the DB if I do NOT active any index !
>
> Then afterwards I can active any index' NOT involving foreign keys.
>
> I can DELETE any foreign key already defined.
>
> But what I can't do is:
>
> - Active ANY foreign key reference !
> - Make ANY new foreign keys !
>
>
> Right now, there is no problems, since the original DB is up and
> running.
>
> But if I don't find this error, I think I will get into trouble in
> the future.......
>
>
> Michael