- 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
Impact of database downtime on the COBOL-DB2 program
Problem: What will be the result if a COBOL-DB2 program tries to query a DB2 table, but the database in which table is residing is down?
When we try to access any table using a COBOL-DB2 program and the DB2 database in which that table is residing is down then the COBOL-DB2 program will abend. In this case, the SQLCODE of SQLCA field will have the value as -904.
As per the IBM documentation SQLCODE -904 states.
“Unavailable resource. The database or tablespace is not available for use”
There are several methods which we can use in order to find the current status of the DB2 database.
Execute db2start command in the admin panel. If we get any message as given below, it indicates that DB2 is up.
11/14/2020 12:04:05 0 0 SQL1026N The database manager is already active.
Execute db2pd command in the admin panel. This command will give the current status of DB2 database. If the database is UP then it will give the number of days since the database instance is up and running.
-- Active -- 3 days 34:04:19 -- Date 2020-11-14-11.56.02.911862
In order to restart the DB2 database instance, we can use the following DBA command in the admin panel.
There may be a possibility that the database may be working as expected but there might be some issue at tablespace level. In such a scenario we can check the status of tablespace by executing the below command from the admin panel.
db2 “list tablespaces”
- How LOST UPDATE and DIRTY READ impact the processing of a COBOL-DB2 program?
- How NON-REPEATABLE READ & PHANTOMS impact functioning of a COBOL-DB2 program?
- How to precompile a COBOL-DB2 program?
- Steps involved in compilation of a COBOL-DB2 program
- Implementation of restart logic in a COBOL-DB2 program
- Purpose and usage of SAVEPOINT in COBOL-DB2 program
- Behaviour of a COBOL-DB2 program when number of locks exceed the limit
- How to execute a COBOL-DB2 program PROGA of plan PLANA?
- How can you revert all the DB2 table changes done in a COBOL-DB2 program?
- How to get the list of all COBOL-DB2 programs using a DB2 table TAB1?
- Implementation of a table level locks in a COBOL-DB2 program during program execution
- How will you detect the condition of the end of cursor rows in a COBOL-DB2 program?
- What is the purpose and usage of SQLCODE within the SQLCA in a COBOL-DB2 program
- How to use SQLCA in a COBOL-DB2 program? What is the purpose of SQLCA?
- Describe the impact of organizational factors on financial performance