Oracle locked records are unlocked?

Source: Internet
Author: User
A record of a table in the marshal database is locked and cannot be modified or deleted (only the hourglass is displayed. This is the case for an hour). The table object cannot be deleted. The error "ORA_00054:" is returned: when resources are busy, you must specify NOWAIT solution: 1. In the current session, both commit and rollback can be unlocked. 2. When other sessions (DBAs) Pass

A record of a table in the marshal database is locked and cannot be modified or deleted (only the hourglass is displayed. This is the case for an hour). The table object cannot be deleted. The error "ORA_00054:" is returned: when resources are busy, you must specify NOWAIT solution: 1. In the current session, both commit and rollback can be unlocked. 2. When other sessions (DBAs) Pass

A record of a table in the marshal database is locked and cannot be modified or deleted (only the hourglass is displayed. This is the case for an hour). You cannot delete the table object, and an error is returned:
ORA_00054: the resource is busy. You must specify NOWAIT.

Solution:

1. Both commit and rollback can be unlocked in the current session.
2. Pass
Search for user locks
Select s. username,
Decode (l. type, 'TT', 'table lock ',
'Tx ', 'row lock ',
NULL) LOCK_LEVEL,
O. owner, o. object_name, o. object_type,
S. sid, s. serial #, s. terminal, s. machine, s. program, s. osuser
From v $ session s, v $ lock l, dba_objects o
Where s. sid = l. sid
And o. object_id = l. id1
And s. username is not null
Check who has locked the table.
In the result, object_name = 'your table name'
Then get sid, serial #
Alter system kill session 'sid, serial #'
Or
Alter system disconnect session 'sid, serial # 'immediate;
3. select * from table for update nowait can specify nowait

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.