Oracle's lock table and unlock

Source: Internet
Author: User
Tags vps

Step 1: Use the following SQL to view the list of processes to determine which table is locked
SELECT DOB. object_name Table_name,lo. session_id| | ', ' | | Vss. serial# Delete number,
Lo.locked_mode,lo. session_id, VSS. Serial#,vss.action action,vss.osuser Osuser, VSS. Logon_time,
Vss.process Ap_pid, VPS. SPID Db_pid, vss.*
From V$locked_object Lo, dba_objects dob, v$session VSS, v$process VPS
Where Lo. object_id = dob. object_id
And lo. session_id = VSS. Sid
and vss.paddr = Vps.addr
ORDER BY 2,3,dob.object_name
Step 2 Delete The process, such as the previous "delete number" to find the result of "286, 2184", then run the following SQL
ALTER system kill session ' 286, 2184 '

Oracle's lock table and unlock

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