DB2 database hangs on db2 connect - use db2pd to troubleshoot

16 July,2013 by Tom Collins

During a DB2 database Physical 2 Virtual (P2V)  migration , the systems administrator did not request for the application  be shut down. The usual practise for a P2V is to shut down the application and shut down DB2 – then start P2V. This didn’t occur and resulted in a potential corruption.

When I restarted the DB2 server instance and attempted a db2 connect – the DB2 database wouldn’t progress with a successful connection. After some db2diag.log investigation and a DB2 instance restart – a message appeared:


ADM1532E  Crash recovery has failed with SQLCODE "-1042".

Roll Forward to a point in time before the transaction log entry
is replayed.


At this point , I did a quick check on db2adutl and confirmed there was a valid backup and logs up to 10 minutes before the P2V occurred and satisfied the Recovery Point SLA - and . But it would be interesting to investigate why this issue arose.

First step – run these three commands , which return a significant amount of detail and can supply some clues . As well as the scenario I’ve outlined – this troubleshooting process is useful for all types of issues

Logon as with sufficient privileges  to Database Server and issue  these commands. The db2pd command in particular can offer tons of insight about what is occurring on the database server


1. db2 get snapshot for applications on             

2. db2 get snapshot for db on                       

--runs all options on all dbs
3. db2pd -everything  

 Read More on reorg, trap files and SQL1035N

How to monitor a DB2 REORG - DBA DB2

Analyzing a DB2 trap file - DBA DB2

DB2 - SQL1035N The database is currently in use - DBA DB2

DBA secrets to stress reduction

Author: Rambler(http://www.dba-db2.com)


Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Your comment could not be posted. Error type:
Your comment has been saved. Comments are moderated and will not appear until approved by the author. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.


Post a comment on DB2 database hangs on db2 connect - use db2pd to troubleshoot

Comments are moderated, and will not appear until the author has approved them.

dba-db2.com | DB2 Performance Tuning | DBA DB2:Everything | FAQ | Contact | Copyright