Checking whether an db2 instance is running fine
Atul.Singh 270002HUVT Visits (13109)
After every DB2 recycle we need to check whether our DB2 instance is running fine or not.
Here I am sharing some checks which can tell us the instance is running fine or not.
Start connecting to the database
db2 connect to <db_name>
db2 connect to test
Database Connection Information
Database server = DB2/NT 9.7.5
SQL authorization ID = ADMINIST...
Local database alias = TEST
Now, We will check the tablespaces
db2 list tablespaces show detail | grep State
If you can’t connect or if any tablespace has state different of 0x0000, look for more information into db2diag.log.
Check the db2diag.log
tail -100 db2diag.log
db2diag -t starttime:endtime (ex. db2diag 2007
Perform any select:
db2 select * from syscat.dbauth
This procedure should be done after every db2 recycle, server reboot or when someone has a problem and ask you to check if the database is ok. For this last option you might check the applications as well to see if nothing is hanging or in lock wait.