Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews DB Oracle Interviews:Concepts and ArchitectureData AccessDatabase ArchitectureDatabase ManagementDatabase Security OracleDistributed ProcessingFlexfieldForms ReportsGeneral OracleMemory ManagementMTO-SAP Financial AccountingOCIOracle AOLOracle AROracle Backup RecoveryOracle D2KOracle DatabaseOracle Database DeveloperOracle DB OptimizationOracle DBAOracle DeveloperOracle ETLOracle Forms 3.0Oracle Forms 4.0Oracle GLOracle PL-SQLOracle RMANOracle ScenariosOracle SecurityOracle SQLOracle System ArchitectureOracle Technology Network (OTN)Programmatic ConstructsRAC (Real Application Clusters)SQL Plus
Copyright © 2018. All Rights Reserved
Oracle Database Interview Question:
How Oracle Handles Dead Locks?
Submitted by: AdministratorOracle 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/globalguideline
SQL> UPDATE ggl_links
SET notes='Session 1'
WHERE id=101;
1 row updated.
<pre> (session 2)
SQL> connect HR/globalguideline
SQL> UPDATE ggl_links
SET notes='Session 2'
WHERE id=110;
1 row updated.
SQL> UPDATE ggl_links
SET notes='Session 2'
WHERE id=101;
(blocked by lock id=101)
SQL> UPDATE ggl_links
SET notes='Session 1'
WHERE id=110;
(blocked by lock on row id=110)
ORA-00060: deadlock
detected w
Submitted by: Administrator
(session 1)
SQL> connect HR/globalguideline
SQL> UPDATE ggl_links
SET notes='Session 1'
WHERE id=101;
1 row updated.
<pre> (session 2)
SQL> connect HR/globalguideline
SQL> UPDATE ggl_links
SET notes='Session 2'
WHERE id=110;
1 row updated.
SQL> UPDATE ggl_links
SET notes='Session 2'
WHERE id=101;
(blocked by lock id=101)
SQL> UPDATE ggl_links
SET notes='Session 1'
WHERE id=110;
(blocked by lock on row id=110)
ORA-00060: deadlock
detected w
Submitted by: Administrator
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.