Maik Sommer - Finas GmbH
2012-09-13 13:52:24 UTC
Hi,
the Result is <NULL>
Question: An index-reorg should fix this, right? Because i`ve done so tuesday night...
Mit freundlichen Grüßen aus der Lutherstadt
Maik Sommer
IT-Systemadministrator
processed by David.fx
Subject: Re: Re-6: [firebird-support] Restore fails due to "duplicate Value in unique Index" (13-Sep-2012 15:20)
select
rdb$collation_name || ''
from
rdb$collations
group by
rdb$collation_name || ''
having
count(*) > 1
Regards,
Thomas
the Result is <NULL>
Question: An index-reorg should fix this, right? Because i`ve done so tuesday night...
Mit freundlichen Grüßen aus der Lutherstadt
Maik Sommer
IT-Systemadministrator
processed by David.fx
Subject: Re: Re-6: [firebird-support] Restore fails due to "duplicate Value in unique Index" (13-Sep-2012 15:20)
the querys are executed in a copy of that db. On tuesday, i recognized the issue (that came without any reason). After a gbak, i stopped programs that were using the database, stopped the default instance and made a copy to a different volume, so i have a database i can Analyse. Currently, i made another copy, that i use to Analyse it with IBFirstAid 2.6.
I think this is a very weird issue....
I wonder if index RDB$INDEX_20 is corrupt. What's the result of:I think this is a very weird issue....
select
rdb$collation_name || ''
from
rdb$collations
group by
rdb$collation_name || ''
having
count(*) > 1
Regards,
Thomas
Mit freundlichen Grüßen aus der Lutherstadt
Maik Sommer
IT-Systemadministrator
processed by David.fx
Subject: Re: Re-4: [firebird-support] Restore fails due to "duplicate Value in unique Index" (13-Sep-2012 14:29)
database the faulty backup is based on?
Regards,
Thomas
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
[Non-text portions of this message have been removed]Maik Sommer
IT-Systemadministrator
processed by David.fx
Subject: Re: Re-4: [firebird-support] Restore fails due to "duplicate Value in unique Index" (13-Sep-2012 14:29)
RDB$RELATION_NAMERDB$FIELD_NAME
RDB$COLLATIONSRDB$COLLATION_NAME
Thought so and that's weird. And you have executed both queries in theRDB$COLLATIONSRDB$COLLATION_NAME
database the faulty backup is based on?
Regards,
Thomas
Regards
Maik Sommer
IT-Systemadministrator
processed by David.fx
Subject: Re: Re-2: [firebird-support] Restore fails due to "duplicate Value in unique Index" (13-Sep-2012 14:13)
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'
Regards,
Thomas
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
[Non-text portions of this message have been removed]Maik Sommer
IT-Systemadministrator
processed by David.fx
Subject: Re: Re-2: [firebird-support] Restore fails due to "duplicate Value in unique Index" (13-Sep-2012 14:13)
Thanks for your quick response.
The query
"select
rdb$collation_name
from
rdb$collations
group by
rdb$collation_name
having
count(*) > 1"
RDB$COLLATION_NAME
<NULL>
selectThe query
"select
rdb$collation_name
from
rdb$collations
group by
rdb$collation_name
having
count(*) > 1"
RDB$COLLATION_NAME
<NULL>
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'
Regards,
Thomas
Greetings from Lutherstadt Wittenberg :-)
Maik Sommer
IT-Systemadministrator
processed by David.fx
Subject: Re: [firebird-support] Restore fails due to "duplicate Value in unique Index" (13-Sep-2012 14:03)
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
[Non-text portions of this message have been removed]
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
[Non-text portions of this message have been removed]Maik Sommer
IT-Systemadministrator
processed by David.fx
Subject: Re: [firebird-support] Restore fails due to "duplicate Value in unique Index" (13-Sep-2012 14:03)
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. Thisunique 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?
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
[Non-text portions of this message have been removed]
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links
------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Visit http://www.firebirdsql.org and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !
Also search the knowledgebases at http://www.ibphoenix.com
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Yahoo! Groups Links