ADSM-L

SAP Database Stop/Start Script

2006-09-15 06:42:55
Subject: SAP Database Stop/Start Script
From: Pranav Parikh <pparikh AT ONTRACKIN DOT COM>
To: ADSM-L AT VM.MARIST DOT EDU
Date: Fri, 15 Sep 2006 16:06:19 +0530
Dear All,

I am facing problem in executing below script thro' tsm client scheduler
in background mode. if we start the scheduler service in forground by
executing "dsmc scheule", the scripts works fine. However  using "nohup
dsmc schedule 2> /dev/null &"  it fails to execute.

Our TSM server is on Win2K3 V5.3.3.2 and BA Client V5.3.4 on AIX 5.3.x

Request your help to resolve these.



SAP Database Start Script:
#!/bin/ksh
rm /tmp/backup_start_ecq.log | tee -a /tmp/backup_start_ecq.log
chmod 777 /tmp/backup_start_ecq.log
/usr/bin/su - ecqadm -c "/sapmnt/ECQ/exe/cleanipc 11 remove | tee -a
/tmp/backup_start_ecq.log"
echo set echo on          > /tmp/%start.tmp
echo "connect / as sysdba;"  >> /tmp/%start.tmp
echo "startup;"              >> /tmp/%start.tmp
echo "exit;"                >> /tmp/%start.tmp
chmod 777 /tmp/%start.tmp
/usr/bin/su - oraecq -c "sqlplus /nolog @/tmp/%start.tmp | tee -a
/tmp/backup_start_ecq.log"
rm /tmp/%start.tmp | tee -a /tmp/backup_start_ecq.log
/usr/bin/su - oraecq -c "lsnrctl start | tee -a
/tmp/backup_start_ecq.log"
/usr/bin/su - ecqadm -c "/sapmnt/ECQ/exe/startsap | tee -a
/tmp/backup_start_ecq.log"
ps -ef | grep -i ora | tee -a /tmp/backup_start_ecq.log
ps -ef | grep -i sap | tee -a /tmp/backup_start_ecq.log

======================================================================================

SAP Database Stop Script:
#!/bin/ksh
rm /tmp/backup_stop_ecq.log | tee -a /tmp/backup_stop_ecq.log
chmod 777 /tmp/backup_stop_ecq.log
/usr/bin/su - ecqadm -c "/sapmnt/ECQ/exe/stopsap | tee -a
/tmp/backup_stop_ecq.log"
/usr/bin/su - ecqadm -c "/sapmnt/ECQ/exe/saposcol -k | tee -a
/tmp/backup_stop_ecq.log"
/usr/bin/su - ecqadm -c "/sapmnt/ECQ/exe/cleanipc 11 remove | tee -a
/tmp/backup_stop_ecq.log"
echo set echo on          > /tmp/%stop.tmp
echo "connect / as sysdba;"  >> /tmp/%stop.tmp
echo "shutdown immediate;"  >> /tmp/%stop.tmp
echo "exit;"                >> /tmp/%stop.tmp
chmod 777 /tmp/%stop.tmp
/usr/bin/su - oraecq -c "sqlplus /nolog @/tmp/%stop.tmp | tee -a
/tmp/backup_stop_ecq.log"
rm /tmp/%stop.tmp | tee -a /tmp/backup_stop_ecq.log
/usr/bin/su - oraecq -c "lsnrctl stop | tee -a
/tmp/backup_stop_ecq.log"
ps -ef | grep -i sap | tee -a /tmp/backup_stop_ecq.log
ps -ef | grep -i ora | tee -a /tmp/backup_stop_ecq.log
===========================================================================

Regards,
Pranav

<Prev in Thread] Current Thread [Next in Thread>