Friday, 6 June 2014

How to do a DB2 instance recycle on AIX

How to do a DB2 instance recycle on AIX

These are the steps you should execute when you need to do a DB2 instance recycle running on AIX
1 - Ask the application people to stop the application before you start with DB2 recycle
2 - Login with the instance owner id to run the commands:

db2 list applications show detail

3 - If there are applications left, double check with the application people if they stopped everything. If you still see applications left, you can do

db2 force applications all
db2 terminate
db2 deactivate db <db_name>
db2stop

4 - If the instance doesn’t come down because some application are still left, use

db2stop force

5 - If db2stop force cant bring the instance down run

db2_kill
ipclean –a

This will cleanup memory.

6 - Check if there are processes left using

ps –ef | grep <instance_name>

7 - Check if there are any ipc resources left for your instance using

ipcs –a | grep <instance_name>

If yes, try to kill them as root (use sudo):

sudo ipcrm –m resource_id (for m resources)
sudo ipcrm –s resource_id (for s resources)
sudo ipcrm –q resource_id (for q resources)

8 - Now that everything is clean, you should be able to start your instance

db2start

No comments:

Post a Comment