SQL1034C The database is damaged - DB2
DB2 v9.1
AIX 5.3
AIX 5.3
This post demonstrate step by step
approach to restart a database which returns SQL1034C in DB2.
Error →
bash-4.2$ db2 connect to TESTDB
SQL1034C The database is damaged.
All applications processing the database
have been stopped. SQLSTATE=58031
1. DB2 stop with force application all.
bash-4.2$ db2 force application all
DB20000I The FORCE APPLICATION
command completed successfully.
DB21024I This command is
asynchronous and may not be effective immediately.
bash-4.2$ db2 list active databases
SQL1611W No data was returned by
Database System Monitor.
bash-4.2$ db2stop
02/24/2015 01:38:16 0 0
SQL1025N The database manager was not stopped because databases are
still active.
SQL1025N The database manager was
not stopped because databases are still active.
2. DB2 quiesce instance force
connections
bash-4.2$ db2 quiesce instance
TINST1 immediate force connections
SQL0913N Unsuccessful execution
caused by deadlock or timeout. Reason code
"80". SQLSTATE=57033
While the command was running errors
were reported in diag log and in .nfy log there were below errors,
ADM7519W DB2 could not allocate an
agent. The SQLCODE is "-3807".
3. DB2stop force
bash-4.2$ db2stop force
02/24/2015 02:12:22 0 0
SQL1042C An unexpected system error occurred.
SQL1025N The database manager was
not stopped because databases are still active.
4. DB2 kill followed by admin mode
start and database restart.
bash-4.2$ db2_kill
followed by ipcs
and ipcrm to remove any remaing db2 ipcs processes.
bash-4.2$ db2start admin mode
02/24/2015 02:14:42 0 0
SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was
successful.
bash-4.2$
bash-4.2$ db2 restart database
TESTDB
DB20000I The RESTART DATABASE
command completed successfully.
bash-4.2$
bash-4.2$
bash-4.2$ db2 connect to TESTDB
Database Connection Information
Database server = DB2/AIX64
9.1.9
SQL authorization ID = TINST1
Local database alias = TESTDB
bash-4.2$
After above steps
db instance was stopped/ started normally (using db2stop and
db2start) and the db was available for applications.
Comments
Post a Comment