Personal tools
You are here: Home DB2 How To's Checking if an instance is running fine
Log in

Forgot your password?
Document Actions

Checking if an instance is running fine

Can you connect to each database of the instance? Do all tablespaces have normal state for all the databases under the instance? Follow the steps and check this out.

Start connecting to the database

db2 connect to <bd_name>


db2 connect to sample
   Database Connection Information
 Database server        = DB2/NT 9.5.0
 SQL authorization ID   = DB2INST1
 Local database alias   = SAMPLE

Now check the state of the tablespaces

db2 list tablespaces show detail | grep –I state


 db2 list tablespaces show detail | grep –I state

 State                                = 0x0000
 State                                = 0x0000
 State                                = 0x0000
 State                                = 0x0000

Check the db2diag.log

tail -100 db2diag.log


db2diag -t starttime:endtime (ex. db2diag 2007-10-02:2007-10-03)

Perform any select:

db2 select * from syscat.dbauth

If you can’t connect or if any tablespace has state different of 0x0000, look for more information into db2diag.log. 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.

Security Awareness
Would you like your company to implement gamification into your security awareness program?