Solved

Dead Lock detection

Posted on 2004-08-30
2
2,034 Views
Last Modified: 2008-02-01
On Oracle 8i and 9i
On UNIX

from your experience, how long does it take Oracle to detect dead locks in the db?

Thanks
0
Comment
Question by:peledc
2 Comments
 
LVL 7

Accepted Solution

by:
grim_toaster earned 250 total points
ID: 11940823
Dead locks should be picked up immediately, here's an example.  You will require two SQL*Plus sessions...

-- Create test data...
CREATE TABLE t1 (id NUMBER);
CREATE TABLE t2 (id NUMBER);
INSERT INTO t1 VALUES(1);
INSERT INTO t1 VALUES(2);
INSERT INTO t2 VALUES(1);
INSERT INTO t2 VALUES(2);
COMMIT;

-- Now, in session one, run...
DELETE FROM t1 WHERE id = 1;

-- Now, in session two, run...
DELETE FROM t2 WHERE id = 1;
DELETE FROM t1 WHERE id = 1;

Now, in session one, run...
DELETE FROM t2 WHERE id = 1;

Session two will now have its last statement cancelled (the transaction is not rolled back): ORA-00060: deadlock detected while waiting for resource
0
 
LVL 23

Expert Comment

by:seazodiac
ID: 11940936
DEADLOCK is a rare, serious error considered by Oracle.

so it's logged in the alert.log file.


Your comments---->how long does it take Oracle to detect dead locks in the db?

right away.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
oracle query help 36 83
Pfile and SPfile - Oracle 2 57
SQL Query 34 82
How do I call MySQL Stored Procedure from oracle using HS link ? 5 27
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now