> i have a problem with my 27Gb FB2.5 Database. Doing a backup is workíng fine. 
> Doing a restore is failing due to the following error:
>
> gbak: ERROR:attempt to store duplicate value (visible to active transactions) 
> in
>   unique index "RDB$INDEX_20"
> gbak:Exiting before completion due to errors
>
> Here`s the clue: The database is working fine. There are no duplicated roles, 
> no duplicated datasets, index-reorg is working fine, gfix could`t find ANY 
> errors.
>
> I tried to find out, which relation "RDB$INDEX_20" has. It refers to a table 
> named "Abrechnung", Column named "RUECKBUCHUNG". But there are no duplicated 
> values. In fact, Column "RUECKBUCHUNG" is always empty (IS NULL).
>
> Any Ideas?

IMHO, RDB$INDEX_20 is an index on the RDB$COLLATIONS system table. This 
can be proved by:

select
   i.rdb$relation_name
   , s.rdb$field_name
from
   rdb$indices i join rdb$index_segments s on (i.rdb$index_name = 
s.rdb$index_name)
where
   i.rdb$index_name = 'RDB$INDEX_20'


So, basically this means, there are duplicate values in 
RDB$COLLATIONS.RDB$COLLATION_NAME. What do you get by executing the 
following query?

select
   rdb$collation_name
from
   rdb$collations
group by
   rdb$collation_name
having
   count(*) > 1


Greetings from Austria (lost 1:2 unlucky). ;-)

Regards,
Thomas

Reply via email to