Subject | Re: Exception restoring data |
---|---|
Author | Adam |
Post date | 2006-08-19T05:46:10Z |
--- In firebird-support@yahoogroups.com, "Ed Dressel" <Dressel@...> wrote:
As always when you get suspected database corruption, shut down the
service and take a file system copy of the database file to play with
just in case an experiment goes pear shaped.
It looks to me like corruption to me, have you tried gfix?
Can you identify the foreign key rule that RDB$FOREIGN14 represents?
The following query may help:
select ri.RDB$RELATION_NAME, rs.RDB$FIELD_NAME
from RDB$INDICES ri
join RDB$INDEX_SEGMENTS rs on (ri.RDB$INDEX_NAME = rs.RDB$INDEX_NAME)
where ri.RDB$INDEX_NAME = 'RDB$FOREIGN14'
Can you drop that constraint? If so, does it work now? If so, don't
forget to redeclare the constraint.
Adam
>00:00:06
> I am getting an exception when I restore data (using IBExpert's
> interface to do this):
>
> IBE: Starting restore. Current time: 11:35:46 AM
> IBE: Unsuccessful execution caused by system error that does not
> preclude successful execution of subsequent statements.
> action cancelled by trigger (3) to preserve data integrity.
> Cannot deactivate primary index.
> IBE: Restore completed. Current time: 11:35:52 AM. Elapsed time:
>data.
>
> I turned on verbose logging and the log file just stops after logging
> a number of indexes--no exception messages before that:
>
> gbak: creating indexes
> gbak: restoring index PK_NEWSINFO
> gbak: restoring index NEWSINFO_IDX1
> gbak: restoring index BACKUPLOG_PK
> gbak: restoring index CUSTOMERQUOTEINFO_IDX1
> gbak: restoring index CUSTOMERQUOTEINFO_IDX2
> gbak: restoring index PK_TRAININGINFO
> gbak: restoring index TRAININGINFO_IDX1
> gbak: restoring index WEBACTINLOG_PK
> gbak: restoring index UTLITYINFO_PK
> gbak: restoring index RDB$PRIMARY11
> gbak: restoring index COMPANYINFOIDX1
> gbak: restoring index ACTIONINFO_PK
> gbak: restoring index RDB$25
> gbak: restoring index RDB$PRIMARY26
> gbak: restoring index RDB$PRIMARY7
> gbak: restoring index IDXCLIENTLOGDATASETANDID
> gbak: restoring index RDB$PRIMARY9
> gbak: restoring index IDXCOMPANYIDREFNO
> gbak: restoring index RDB$FOREIGN22
> gbak: restoring index RDB$FOREIGN14
>
> Something that seems to be related to it...I have a problem deleting
> old data in the database--it won't let me, gives me an exception:
>
> internal gds software consistency check (partner index description not
> found (175)).
>
> The RDB$FOREIGN14 index is on the table that will not let me delete
>Ed,
> What should i be looking at?
As always when you get suspected database corruption, shut down the
service and take a file system copy of the database file to play with
just in case an experiment goes pear shaped.
It looks to me like corruption to me, have you tried gfix?
Can you identify the foreign key rule that RDB$FOREIGN14 represents?
The following query may help:
select ri.RDB$RELATION_NAME, rs.RDB$FIELD_NAME
from RDB$INDICES ri
join RDB$INDEX_SEGMENTS rs on (ri.RDB$INDEX_NAME = rs.RDB$INDEX_NAME)
where ri.RDB$INDEX_NAME = 'RDB$FOREIGN14'
Can you drop that constraint? If so, does it work now? If so, don't
forget to redeclare the constraint.
Adam