On our SLES10 server I see db2profile is in /home/db2inst1/sqllib
Thank you. We also want to automate db2 startup along with MQ  

-----Original Message-----
From: Linux on 390 Port [mailto:linux-...@vm.marist.edu] On Behalf Of LJ Mace
Sent: Friday, May 01, 2009 11:03 AM
To: LINUX-390@VM.MARIST.EDU
Subject: Re: /etc/init.d start/stop scripts for DB2 MQ and Websphere

Try this:

cd /home/udbdb1/sqllib
. /home/udbdb1/sqllib/db2profile

good luck
Mace

--- On Thu, 4/30/09, Shedlock, George <gshedl...@aegonusa.com> wrote:

> From: Shedlock, George <gshedl...@aegonusa.com>
> Subject: /etc/init.d start/stop scripts for DB2 MQ and Websphere
> To: LINUX-390@VM.MARIST.EDU
> Date: Thursday, April 30, 2009, 2:05 PM I am trying to get some 
> scripts set up to start / stop DB2, MQ and Websphere applications. The 
> scripts I have are in this format:
> 
> #! /bin/bash
> set -x
> case "$1" in
> 'start')
>         /bin/su - udbdb1 -c
> "/home/udbdb1/sqllib/adm/db2start"
>         ;;
> 'stop')
>         /bin/su - udbdb1 -c
> "/home/udbdb1/sqllib/adm/db2stop"
>         ;;
> 'restart')
>         stop
>       start
>         ;;
> *)
>         echo $"Usage: $0
> {start|stop|restart}"
>         exit 1
>         ;;
> Esac
> 
> This is failing because the environment variables are not set up 
> correctly (-1390 reason 3 return code). Any suggestions on how to fix 
> this?
> 
> I have found a way to initiate this with:
> sudo -u udbdb1 -i /etc/init.d/db2 start
> 
> The problem with this is that I cannot find a way to implement this in 
> the /etc/sudoers file so a non-privileged user can run the command.
> 
> Any suggestions on how to make either of these methods work will be 
> greatly appreciated.
> 
> George Shedlock Jr
> AEGON Information Technology
> AEGON USA
> 502-560-3541
> 
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions, send 
> email to lists...@vm.marist.edu with the message: INFO LINUX-390 or 
> visit http://www.marist.edu/htbin/wlvindex?LINUX-390
> 




----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions, send email to 
lists...@vm.marist.edu with the message: INFO LINUX-390 or visit 
http://www.marist.edu/htbin/wlvindex?LINUX-390
************************************************************
This communication, including attachments, is for the exclusive use of 
addressee and may contain proprietary, confidential and/or privileged 
information.  If you are not the intended recipient, any use, copying, 
disclosure, dissemination or distribution is strictly prohibited.  If you are 
not the intended recipient, please notify the sender immediately by return 
e-mail, delete this communication and destroy all copies.
************************************************************

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to