Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

When does deadlock happen between sessions & how do we get rid of it?

user-image
Question added by mazin elfaki , Application Software Developer , medica import and export Co. Ltd
Date Posted: 2017/02/17
Anish Jose
by Anish Jose , Oracle Consultant , First AbuDhabi Bank

A deadlock occurs when two or more sessions are waiting for data locked by each other, resulting in all the sessions being blocked. In the case of Oracle, the database engine automatically detects and resolves deadlocks by rolling back the statement associated with the transaction that detects the deadlock. Typically, deadlocks are caused by poorly implemented locking in application code.

ayesha nazir
by ayesha nazir , internee , treet corporation limited

deadlock accure with sessions which has been running a SELECT for an hourand session .that is running a single-row UPDATE , and both have the same DEADLOCK PRIORITY.

and we avoide this by Access Objects in the Same Orders, Avoid User Interaction in Transactions and Use Bound Connections.

 

salad Ahmed nur
by salad Ahmed nur , IT SECTOR , IT COMPANY

A deadlock occurs when two or more sessions are waiting for data locked by each other, resulting in all the sessions being blocked. Oracle automatically detects and resolves deadlocks by rolling back the statement associated with the transaction that detects the deadlock. Typically, deadlocks are caused by poorly implemented locking in application code. This article shows the steps necessary to identify the offending application code when a deadlock is detected.

Shahzeb Mokarram
by Shahzeb Mokarram , Software Developer , Sport Ghornatah

 

accepte

A deadlock occurs when two separate transactions each want different resources and neither will release the one that they have so that the other can run

ANKUSH CHAWLA
by ANKUSH CHAWLA , Technical Architect- Oracle DBA , Novartis HealthCare Pvt. Ltd

In a database, a deadlock is a situation in which two or more sessions are waiting for one another to give up locks on same data.

Assume a transaction A is holding block A and waiting for block B ,and a transaction B holding block B and waiting for Block AOracle detects the deadlock and resolve it by rollback one transactions and reports in Alert log file

Amar Nath
by Amar Nath , 76 Server , Infrastructure

  • Locking in the Database Engine
  • Customizing Locking and Row Versioning
  • Lock Modes
  • Lock Compatibility
  • Row Versioning-based Isolation Levels in the Database Engine
  • Controlling Transactions (Database Engine)

Hidayat Khan
by Hidayat Khan , Database Administrator , Provincial Assembly Khyber pakhtunkhwa

When two or more transactions requests for data which are locked by the another transaction and thus both transactions goes in waiting.

Arvind RX
by Arvind RX , IT Specialist , IBM

Locking is most common mechanism in oracle database engine. When a user starts his transaction say an update he locks the table row, say at the same time another user also tries deadlock happens. Oracle then triggers ora-60 deadlock error. One of the session either has to timeout or need to be killed

MOHAMMAD SAJADULLA KHAN PAMUDURTHI
by MOHAMMAD SAJADULLA KHAN PAMUDURTHI , Junior engineer-Product support , HCL Technologies

At this point, neither process can proceed; we have a deadlock. ... If a deadlock occursbetween session A, which has been running a SELECT for ... in the deadlock, and then set about trying to ensure that it does not occur again. .... Locks here will mainly be key, RID, page or table, with more exotic range ..

Jamshed  Ahmed
by Jamshed Ahmed , Database Manager , Virtual Remittance Gateway PVT Ltd

Dead Lock Occur when user session access or performing update/inser on same object. It is autometically resolved...

Wajid  Khan
by Wajid Khan , Oracle DBA , Precise Technology Consultant

A deadlock occurs when two or more sessions are waiting for data locked by each other, resulting in all the sessions being blocked. Oracle automatically detects and resolves deadlocks by rolling back the statement associated with the transaction that detects the deadlock.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.