Oracle checks the locked table and unlocks it

Source: Internet
Author: User

Address: http://tech.e800.com.cn/articles/2009/710/1247207067745_1.html

 

Solution 1:

Check which table is locked

Select sess. Sid, sess. Serial #,
Lo. oracle_username, Lo. OS _user_name, ao. object_name, Lo. locked_mode

From
V $ locked_object Lo, dba_objects AO, V $ session sess

Where ao. object_id =
Lo. object_id

And lo. session_id = sess. Sid;

Unlock

Alter
System kill session 'xxx, yyy ';

Note: 'xxx, yyy' is the obtained sess. Sid, sess. Serial #

 

Solution 2:

Find the session you want to kill,
And write down the paddr.

Select Sid, username, paddr, status from V $ session where
Username = 'jcuser' and SID = the Sid found above;

Find the spid corresponding to this session

Select
ADDR, PID, spid, username, serial #, terminal from V $ process where ADDR =
'Above paddr ';

Kill the process identified by the spid.

Orakill Sid spid

 

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.