Collections:
How Oracle Handles Dead Locks in Oracle
How Oracle Handles Dead Locks in Oracle?
✍: 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)
⇒ Managing Oracle User Accounts, Schema and Privileges
⇐ What Is a Dead Lock in Oracle
2019-08-08, 2580🔥, 0💬
Popular Posts:
Where to find answers to frequently asked questions on Storage Engines: MyISAM, InnoDB and BDB in My...
Is SQL Server Transact-SQL case sensitive? No. Transact-SQL is not case sensitive. Like the standard...
How To Change the Password for Your Own User Account in MySQL? If you want to change the password of...
Where to find tutorials to answer some frequently asked questions on Microsoft SQL Server Transact-S...
What Happens If the UPDATE Subquery Returns Multiple Rows in SQL Server? If a subquery is used in a ...