17 January,2015 by Tom Collins
There are multiple methods of checking the DB2 instance status. The method is usually dependant on the requirements. These are some examples of different situations where the DB2 instance status is required
Server reboot – Has the DB2 instance started OK?Maybe auto start failed or an underlying disk issue.
Connection troubleshooting – Is the DB2 instance available?
Disaster Recovery – On a site failover , has the DB2 instance started OK?
Typically a DBA may go beyond checking just the DB2 instance status. They may want to check database connections , tablespaces and dbdiag.log files for any errors.
Most monitoring application will have a DB2 monitoring module. The monitoring application will check for the DB2 instance status and send a message. Once the DB2 instance is set up and certified , I prefer exception based reporting. Although there are DBAs who prefer a report every morning – read more on Monitor DB2 instance status and database status reporting
Execute this command to check if dbsysc exists.
ps -ef|grep db2sysc
db2start 01/17/2015 12:04:05 0 0 SQL1026N The database manager is already active.
"Db2pd –" tells whether instance is up and for how long
db2pd - Database Member 0 -- Active -- Up 0 days 00:01:23 -- Date 2015-01-17-12.05.04.812467
Method 4 - Use db2_local_ps .
This Linux DB2 command returns the DB2 processes . If no processes are returned use db2start to start the DB2 instance
db2_local_ps
These are just some quick fire methods to check quickly on the instance status.
This is only a preview. Your comment has not yet been posted.
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.
Posted by: |