Oracle Transaction - How Oracle Handles Dead Locks
Interview Question Database For Software Developers
|
|
| How Oracle Handles Dead Locks | | How Oracle Handles Dead Locks? - Oracle DBA FAQ - Understanding SQL Transaction Management | | By: FYIcenter.com | |
Oracle server automatically detects dead locks. When a dead lock is detected,
Oracle server will select a victim transaction, and fail its statement that is blocked in the dead lock
to break the dead lock. The tutorial exercise below shows you an example of statements failed
by Oracle server because of dead locks:
(session 1)
SQL> connect HR/fyicenter
SQL> UPDATE fyi_links
SET notes='Session 1'
WHERE id=101;
1 row updated.
(session 2)
SQL> connect HR/fyicenter
SQL> UPDATE fyi_links
SET notes='Session 2'
WHERE id=110;
1 row updated.
SQL> UPDATE fyi_links
SET notes='Session 2'
WHERE id=101;
(blocked by lock id=101)
SQL> UPDATE fyi_links
SET notes='Session 1'
WHERE id=110;
(blocked by lock on row id=110)
ORA-00060: deadlock
detected while waiting
for resource
(statement failed)
| | ID: 908 | Rank: 1183 | Votes: 0 | Views: 130 | Submitted: 20070417 |
1154 :-) | | What Is a Dead Lock | | What Is a Dead Lock? - Oracle DBA FAQ - Understanding SQL Transaction Management... | | Submitted: 20070417 |
|
Copyright © 2009 FYIcenter.com
All rights in the contents of this Website are reserved by the individual author.
No part of the contents may be reproduced in any form without author's permission.
|
|
|