Subject | Re: Corrupt database |
---|---|
Author | Alexander V.Nevsky |
Post date | 2004-04-30T14:33:21Z |
--- In firebird-support@yahoogroups.com, "zifnabbe" <zifnabbe@u...> wrote:
or in "detail" was inserted record which have'nt parent in master
because of broken index on one of the tables in source database.
Search such a records by
Select Detail.* From Detail
Where Not Exist(Select Master.ID From Master Where
Master.ID=Detail.FK_Column)
looking on this records you can take decision what should be done -
try to insert lost record into master or delete them from detail.
Best regards,
Alexander.
> Mmm,In both. "Master" could lose record when page-level repair was made
>
> When I restore with -inactive. then I can activate all indexes except
> on foreign:
>
> Cannot commit transaction:
> violation of FOREIGN KEY constraint "".
> violation of FOREIGN KEY constraint "PK_PERSONS" on table "PERSONS".
>
> How do I've to interprete this?
>
> Where can the problem be? at the persons table or the other one?
or in "detail" was inserted record which have'nt parent in master
because of broken index on one of the tables in source database.
Search such a records by
Select Detail.* From Detail
Where Not Exist(Select Master.ID From Master Where
Master.ID=Detail.FK_Column)
looking on this records you can take decision what should be done -
try to insert lost record into master or delete them from detail.
Best regards,
Alexander.