Subject | Re: Modify Primary key |
---|---|
Author | skotaylor |
Post date | 2003-07-17T19:34:38Z |
--- In firebird-support@yahoogroups.com, "Alexander V.Nevsky"
<ded@h...> wrote:
Besides, I couldn't locat the proper syntax and everything else I
tried just popped up errors.
I tried:
alter table fuellog drop constraint INTEG_68
and I get
ISC ERROR CODE:335544351
ISC ERROR MESSAGE:
unsuccessful metadata update
object INDEX is in use
tried many times as you said; still no luck.
have all the ib_IB6_docs .pdf files from ibphoenix site and the SQL
ref.html one as well. Maybe I just getting the syntax messed up?
Maybe I need to have exclusive access to alter a primary key, is this
true?
Cheers.
Scott.
<ded@h...> wrote:
> --- In firebird-support@yahoogroups.com, "skotaylor" <scott@d...>I'm just a circuitously wild guy ;)
> wrote:
> > I need to add another field to a primary key on a live database. I
> > added the record to the RDB$INDEX_SEGMENTS and all looks good except
>
> Scott, I'm amazing why people don't like broad, paved with asphalt
> roads and prefer circuitous wild pathes :)
Besides, I couldn't locat the proper syntax and everything else I
tried just popped up errors.
> Why not justWhat does T_PK stand for?
>
> Alter Table T Drop Constraint T_PK;
> Commit;
> Alter Table T Add Constraint T_PK Primary Key (OldCol, NewCol);
> Commit;
I tried:
alter table fuellog drop constraint INTEG_68
and I get
ISC ERROR CODE:335544351
ISC ERROR MESSAGE:
unsuccessful metadata update
object INDEX is in use
> if you have FKs on another tables references on this PK, you shouldNo, none.
> drop them before dropping it and re-create after creation new one.
> Anyway, you should change them too. Perhaps you'll be forced tohmmm... Like the error I got. I know it's not in use, currently, but
> reconnect several times due to "object in use" exception.
tried many times as you said; still no luck.
> Hacks ofI would if I could find the document that tells me how to do this. I
> system table is last what reasonables person should try to do, use
> documented ways.
have all the ib_IB6_docs .pdf files from ibphoenix site and the SQL
ref.html one as well. Maybe I just getting the syntax messed up?
Maybe I need to have exclusive access to alter a primary key, is this
true?
Cheers.
Scott.