-
I am trying to disable the primary key constraint of DEPT table. That didn't work out. So I thought may be I could disable the foreign key of the referenced table (EMP)... .
However, it turned out that when I am working on the parent table, the child table is locked. Now, can anyone tell me how I can unlock from either EMP or DEPT table? Thanks!
The following errors demonstrate how the EMP table is locked.
1* ALTER TABLE scott.dept DISABLE CONSTRAINT DEPT_PRIMARY_KEY
2 /
ALTER TABLE scott.dept DISABLE CONSTRAINT DEPT_PRIMARY_KEY
*
ERROR at line 1:
ORA-02297: cannot disable constraint (SCOTT.DEPT_PRIMARY_KEY) - dependencies exist
------------------------------------------------------------------
SQL>* ALTER TABLE scott.emp DISABLE CONSTRAINT EMP_FOREIGN_KEY
SQL> /
ALTER TABLE scott.emp DISABLE CONSTRAINT EMP_FOREIGN_KEY
*
ERROR at line 1:
ORA-00069: cannot acquire lock -- table locks disabled for EMP
-
Use
ALTER TABLE emp ENABLE TABLE LOCK;
and try again.
Sanjay
-
i have same problem
my table has inner relation and when i enable table lock after 60 second show error
ALTER TABLE table_name ENABLE TABLE LOCK;
>>ora-00054 resource busy and acquire with NOWAIT specified or timeout expired
-
Originally Posted by MEHRDAD27
my table has inner relation and when i enable table lock after 60 second show error
ALTER TABLE table_name ENABLE TABLE LOCK;
>>ora-00054 resource busy and acquire with NOWAIT specified or timeout expired
There is/are open transaction/s affecting targetted table.
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|