- Trending Categories
- Data Structure
- Operating System
- C Programming
- 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).
- Investigation of root cause and resource responsible for the deadlock in DB2
- Error Correcting Codes - Hamming codes
- Error Correcting Codes - Reed-Solomon codes
- Example and usage of JOINS in DB2
- Error-Detecting Codes - Parity
- Error-Detecting Codes - Checksums
- Error Correcting Codes - Low-Density Parity Check Codes
- What are Error-Detecting Codes?
- Error correcting codes in Computer Networks
- How to write custom Python Exceptions with Error Codes and Error Messages?
- Error Correcting Codes - Binary Convolutional Code
- Explain the Hamming Codes in Error Correction
- Starvation and Deadlock
- Error-Detecting Codes - Cyclic Redundancy Checks (CRCs)
- Usage and example of Multi-index and Index-only access path in DB2