In-depth discussion: How Oracle queries the user of the positive lock table and how to release the locked table _oracle

Source: Internet
Author: User

The following SQL statements can be used in Pl/sql to query which tables in the current database are locked and which users lock them:

A.owner,--object owned user
A.object_name,--object name (table name)
B.SESSION_ID,--Session of lock table user
B.oracle_username,--lock table user's ORACLE username
B.os_user_name,--lock table user's operating system login username
C.machine,--the computer name of the user who locked the table (for example: Workgroup\username)
C.status,--lock table state
C.program-the database management tool used by the lock table user (for example: Ob9.exe)
All_objects A,
V$locked_object B,
SYS. Gv_$session C
a.object_id = b.object_id
and b.process = c.process
The order by 1,2 can also use the following command to kill the item in the current lock table:

Alter system kill session ' SID, Serial# '
-for example: Alter system kill session ' 57, 10325

Related Article

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: 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.