How should the Oracle deadlock problem be resolved? Many people may have such a question, the following is to introduce you to the Oracle deadlock processing methods for your reference learning.
In general, it is OK to submit a statement that produces an Oracle deadlock, but in the actual execution process. The user may not know which sentence is the deadlock-generating statement. You can turn the program off and restart it.
This problem is often encountered during Oracle's use, so a solution is also summarized.
1 to find the process of Oracle deadlock:
Sqlplus "/as sysdba" (Sys/change_on_install)
SELECT s.username,l.object_id,l.session_id,s.serial#,
L.oracle_username,l.os_user_name,l.process
From V$locked_object l,v$session S WHERE l.session_id=s.sid;
2 Kill this Oracle deadlock process:
Alter system kill session ' sid,serial# '; (of which sid=l.session_id)
3) If it is not resolved:
Select Pro.spid from v$session ses,
V$process Pro where ses.sid=xx and
SES.PADDR=PRO.ADDR;
Where the SID replaces the SID with the deadlock:
Exit
Ps-ef|grep spid
Where the SPID is the process number of this process, kill this Oracle process
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