Subject | Re: [firebird-support] Error while trying to add a primary key |
---|---|
Author | Aage Johansen |
Post date | 2008-11-01T21:32:21Z |
Larry Johnson wrote:
(RDB$INDICES, probably). A default name for a primary key index will
be of the form RDB$PRIMARYn (as seen when I look into an Fb/1.5 database).
Why a new index with a system generated name should clash with an
existing index is beyond me - maybe a corruption in an internal counter?
Maybe the PrimaryKey constraint (and its index) is already created?
Take a look at the RDB$INDICES table, and observe the data where
RDB$RELATION_NAME = 'MEDIATYPE' (your table).
--
Aage J.
> There is already an index on that column, true, but it isn't declared as aRDB$INDEX_5 is probably a unique index on a system table
> primary key, as far as I can tell. I'll check into this more, though. One
> question: Is RDB$INDEX_5 then the name of the index in question? Note that
> the ALTER statement doesn't name an index, only a column to name as a key,
> so the name is generated for me.
>
(RDB$INDICES, probably). A default name for a primary key index will
be of the form RDB$PRIMARYn (as seen when I look into an Fb/1.5 database).
Why a new index with a system generated name should clash with an
existing index is beyond me - maybe a corruption in an internal counter?
Maybe the PrimaryKey constraint (and its index) is already created?
Take a look at the RDB$INDICES table, and observe the data where
RDB$RELATION_NAME = 'MEDIATYPE' (your table).
--
Aage J.
>
>
> From: firebird-support@yahoogroups.com
> [mailto:firebird-support@yahoogroups.com] On Behalf Of Vlad Khorsun
> Sent: Saturday, November 01, 2008 9:55 AM
> To: firebird-support@yahoogroups.com
> Subject: Re: [firebird-support] Error while trying to add a primary key
>
>
>
>> But back to my real problem. Taking your advice, I copied firebird.msgs to
>> my executable's directory, and now the error reads:
>>
>>
>>
>> DIAG [HY000] [ODBC Firebird Driver][Firebird]unsuccessful metadata update
>>
>> STORE RDB$INDICES failed
>>
>> attempt to store duplicate value (visible to active transactions) in
> unique
>> index "RDB$INDEX_5" (-607)
>
> You already have index named as one you want to create.
>
> Regards,
> Vlad
>