Subject | Adding Constraints |
---|---|
Author | Scott Taylor |
Post date | 2002-08-23T11:54:40Z |
Hello,
Using Linux FirebirdSS T6.2.681, is it necessary to have exclusive access
to add constraints to a table?
I just created 3 tables, 2 master tables and one detail on a live
system. Then with WISQL and Linux version ISQL using this code:
ALTER TABLE T_SECTION
ADD CONSTRAINT MASTER_TTYPE
FOREIGN KEY ( SEC_TTYPE )
REFERENCES TRL_TYPE ( TTYPE ) /* this one */
ON UPDATE CASCADE
ON DELETE CASCADE
, ADD CONSTRAINT MASTER_SECID
FOREIGN KEY ( SEC_ID )
REFERENCES T_SEC_ID ( SECID )
ON UPDATE CASCADE
ON DELETE CASCADE
gave me the error: "table TRL_TYPE is in use", which is silly because I
just created those tables and nobody has the software that uses them
yet. The only way to get it through was to kill all applications accessing
the gds, until I had the only connection.
I don't see anything in the docs about needing to have exclusive access to
the entire database in order to alter a table. Maybe I missed it. Any ideas?
Cheers.
Scott.
Using Linux FirebirdSS T6.2.681, is it necessary to have exclusive access
to add constraints to a table?
I just created 3 tables, 2 master tables and one detail on a live
system. Then with WISQL and Linux version ISQL using this code:
ALTER TABLE T_SECTION
ADD CONSTRAINT MASTER_TTYPE
FOREIGN KEY ( SEC_TTYPE )
REFERENCES TRL_TYPE ( TTYPE ) /* this one */
ON UPDATE CASCADE
ON DELETE CASCADE
, ADD CONSTRAINT MASTER_SECID
FOREIGN KEY ( SEC_ID )
REFERENCES T_SEC_ID ( SECID )
ON UPDATE CASCADE
ON DELETE CASCADE
gave me the error: "table TRL_TYPE is in use", which is silly because I
just created those tables and nobody has the software that uses them
yet. The only way to get it through was to kill all applications accessing
the gds, until I had the only connection.
I don't see anything in the docs about needing to have exclusive access to
the entire database in order to alter a table. Maybe I missed it. Any ideas?
Cheers.
Scott.