- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Error codes, cause and example of deadlock in DB2
A DEADLOCK condition occurs when two applications lock the data that is needed by each other. Both the applications wait for the other one to release the lock and hence deadlock occurs.
Let us see an example to understand this better:
There are two COBOL-DB2 programs in execution: PROG A and PROG B.
The PROG A is holding an UPDATE LOCK in ORDERS table while PROG B is holding a UPDATE LOCK in TRANSACTION table. At some point of time, PROG A requires an UPDATE LOCK on TRANSACTION TABLE and PROG B requires an UPDATE LOCK on ORDERS table but two application programs cannot place an UPDATE LOCK on the same page.
Hence both the programs will wait for each other to release the lock and ultimately enter in DEADLOCK state.
The COBOL-DB2 program fails with error code -911 and -913 in case the program enters in DEADLOCK condition. -911 signifies that DB2 issued an automatic roll back while -913 signifies that automatic roll back is not issued by DB2 (not possible by DB2).
- Related Articles
- Investigation of root cause and resource responsible for the deadlock in DB2
- Error Correcting Codes - Hamming codes
- Error Correcting Codes - Reed-Solomon codes
- Error-Detecting Codes - Parity
- Error-Detecting Codes - Checksums
- Example and usage of JOINS in DB2
- Error Correcting Codes - Low-Density Parity Check Codes
- Error correcting codes in Computer Networks
- What are Error-Detecting Codes?
- How to write custom Python Exceptions with Error Codes and Error Messages?
- Explain the Hamming Codes in Error Correction
- Error Correcting Codes - Binary Convolutional Code
- Error-Detecting Codes - Cyclic Redundancy Checks (CRCs)
- Error codes returned in the PositionError object HTML5 Geolocation
- Error Codes returned in the PositionError object in HTML5 Geolocation
