Oracle deadlock resolution common methods (proven)

Source: Internet
Author: User

--1. querying for locked cases

Select object_name,machine,s.sid,s.serial#

from v$locked_object l,dba_objects O, v$session s

where l.object_id = o.object_id and L.session_id=s.sid;

--2. kill The process of losing a deadlock

alter system kill session ' 24,111 '; --( where 24,111 sid,serial#)

--3. kill " Span style= "word-wrap:normal; Word-break:normal; Font-family:calibri "", query os level thread

Select spid, Osuser, S.program

From V$session s,v$process p

where s.paddr=p.addr and s.sid=24               --24 is above sid

-- 4. os level delete thread    

   --1) unix on Span style= "word-wrap:normal; Word-break:normal; Font-family:calibri "", use root identity execution command :

            #kill-9 12345 3 spid )

   --2) style= word-wrap:normal; Word-break:normal ">windows ( unix also applicable) with orakill kill thread, orakill Yes oracle an executable command provided with the syntax:

orakill SID thread

  -- among them:

   --sid : Indicates the process to be killed belongs to the instance Name

--thread : Is the thread number to be killed, which is the spid queried in step 3 .

Oracle deadlock resolution common methods (proven)

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.