Oracle Series-Lock table and Unlock solution (fencing version)

Source: Internet
Author: User

"Oracle Series-lock table and unlock solution (Big recruit version)"

--1 Viewing a locked table
Select B.owner,b.object_name,a.session_id,a.locked_mode from V$locked_object a,dba_objects b where b.object_id = a.object_id;

--2 look at that user, that process is a deadlock.
Select B.username,b.sid,b.serial#,logon_time from V$locked_object a,v$session b where a.session_id = B.sid ORDER by B.logo N_time;

--3 viewing a connected process
SELECT SID, Serial#, username, osuser from v$session;

--4 Common Kill recruit List-------------------------------
SELECT ' alter system kill session ' | | Ta.sid | | ', ' | | ta.serial# | | ‘‘‘;‘,
' ALTER system disconnect session ' | | Ta.sid | | ', ' | | ta.serial# | | "' immediate; ',
' Host Orakill ' | | Tc.instance_name | | "| | Tb.spid,
' Kill-9 ' | | Tb.spid,
Tb.spid,
Ta.osuser,
Tb.program,
Ta.terminal,
Ta.program
From V$session TA, v$process TB, v$instance TC
WHERE tb.addr = ta.paddr
and Ta.sid = &yoursid;

--5 Kill Process sid,serial# (normal kill)
Alter system kill session ' 15,245 ';
--6 forced interrupt process (buff kill)-very easy to use (cause the card machine no response-directly)
Alter system disconnect session ' 137,212 ' immediate;
--7 Ultimate Kill (big strokes Kill)
--CD to system root c:/xxx
--orakill Oracle_sid Os_thread;
--demo C:/orakill ORCL 245;

PS: To solve the problem is the kingly way.

http://www.cnblogs.com/gushi9908/

Oracle Series-Lock table and Unlock solution (fencing version)

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.