Subject | Re: [firebird-support] Re: Modify Primary key |
---|---|
Author | Hans Hoogstraat |
Post date | 2003-07-17T20:08:31Z |
You don't happen to use something like IB_WISQL with the cursor sitting on
the name of the table you are trying to modify, when you use the same
program to drop the primary key from that table ? Happened to me a few times
:)
----------------------------------------------------------------------------
-------------------------------------------
the name of the table you are trying to modify, when you use the same
program to drop the primary key from that table ? Happened to me a few times
:)
----------------------------------------------------------------------------
-------------------------------------------
----- Original Message -----
From: "skotaylor" <scott@...>
To: <firebird-support@yahoogroups.com>
Sent: Thursday, July 17, 2003 1:34 PM
Subject: [firebird-support] Re: Modify Primary key
| --- In firebird-support@yahoogroups.com, "Alexander V.Nevsky"
| <ded@h...> wrote:
| > --- In firebird-support@yahoogroups.com, "skotaylor" <scott@d...>
| > 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 :)
|
| I'm just a circuitously wild guy ;)
|
| Besides, I couldn't locat the proper syntax and everything else I
| tried just popped up errors.
|
| > Why not just
| >
| > Alter Table T Drop Constraint T_PK;
| > Commit;
| > Alter Table T Add Constraint T_PK Primary Key (OldCol, NewCol);
| > Commit;
|
| What does T_PK stand for?
|
| 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 should
| > drop them before dropping it and re-create after creation new one.
|
| No, none.
|
| > Anyway, you should change them too. Perhaps you'll be forced to
| > reconnect several times due to "object in use" exception.
|
| hmmm... Like the error I got. I know it's not in use, currently, but
| tried many times as you said; still no luck.
|
| > Hacks of
| > system table is last what reasonables person should try to do, use
| > documented ways.
|
| I would if I could find the document that tells me how to do this. I
| 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.
|
|
|
|
| To unsubscribe from this group, send an email to:
| firebird-support-unsubscribe@yahoogroups.com
|
|
|
| Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|
|
|