Solved

Dead Lock detection

Posted on 2004-08-30
2
2,035 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Concat multi row values of a field in oracle 6 66
Best RAID for a BDD Oracle 4 70
Query to identify changes between rows of two tables 8 49
ORA-02288: invalid OPEN mode 2 31
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
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
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

832 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