Subject Re: [firebird-support] How to repair a database with damaged index ?
Author Svein Erling Tysvaer
Maybe something like

select pk_field, count(*)
from table
group by pk_field
having count(*) > 1

to identify the duplicate records to remove/modify before recreating the
key?

Set

Carsten Schäfer wrote:
> Hi,
> I'm using Firebid 1.5.3 on Win XP.
> I have a damaged database
> When i do a backup and restore of this database i get the follwing error
> in ibexpert:
> IBE: Unsuccessful execution caused by system error that does not
> preclude successful execution of subsequent statements.
> action cancelled by trigger (2) to preserve data integrity.
> Cannot deactivate index used by an integrity constraint.
>
> This happens when creating a primary key index.
> When i do restore with deactivating indexes the restore gives no error.
>
> But what are the next steps to repair the database ?
>
> mfg
> Carsten