Subject | Modify Primary key |
---|---|
Author | skotaylor |
Post date | 2003-07-17T16:21:49Z |
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 I
can't change RDB$INDICES.RDB$SEGMENT_COUNT with out getting an error:
ISC ERROR MESSAGE:
action cancelled by trigger (1) to preserve data integrity
Cannot modify index used by an Integrity Constraint
Makes sense, but is there any way to get around this?
I don't want to loose the data by removing the table and rewriting it.
The table is only used in one application, by one user, so it's easy
enough to make sure it's not accessed while it's modified.
Adding the field to the primary key will relax uniqueness not cause
duplicates, so it should be allowed, or at least doable.
Is there a better way?
Cheers.
Scott.
added the record to the RDB$INDEX_SEGMENTS and all looks good except I
can't change RDB$INDICES.RDB$SEGMENT_COUNT with out getting an error:
ISC ERROR MESSAGE:
action cancelled by trigger (1) to preserve data integrity
Cannot modify index used by an Integrity Constraint
Makes sense, but is there any way to get around this?
I don't want to loose the data by removing the table and rewriting it.
The table is only used in one application, by one user, so it's easy
enough to make sure it's not accessed while it's modified.
Adding the field to the primary key will relax uniqueness not cause
duplicates, so it should be allowed, or at least doable.
Is there a better way?
Cheers.
Scott.