db2start at start up on Linux

27 July,2011 by Tom Collins

To manage db2start on all DB2 instances on a server , there is a workaround to use. This is not standard way of managing db2start , but I have found the method useful.

If you are using Clustering software such as Tivoli Storage Automation (TSA) , then the TSA scripts manage the db2start process.

1)  Create  a shell script  and place this code in the script.  I call it “db2.sh”  , any name is OK.

#! /bin/sh 
for i in `/opt/ibm/db2/V9.5/bin/db2ilist`;

 su - $i -c "db2start"


2)       Place the script in the “/etc/init.d”  directory and apply relevant execution rights . 

3)       Permissions to execute

                    chmod 744  db2.sh

4)      Create the symbolic links in the proper rc*.d directories links for intended runlevels. Either manual option or "chkconfig" commnand.

 For example, assuming you want the level 5 start

ln /etc/init.d/db2.sh /etc/rc5.d/db2.sh

The init.d directory contains a number of start/stop scripts for various services on the  system.  Placing the script in the etc/init.d will execute it on start up, as long as symbolic links are created and relevant permission on file

The script iterates through the list of DB2 instances , and assuming there is a  logon account with the same name as the instance , will issue the “db2start” in the security  context of the account.

Related Posts

Tivoli Storage Automation for Multiplatforms(SA MP) and the shared disk approach

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

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 db2start at start up on Linux

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