1753877 Members
7501 Online
108809 Solutions
New Discussion юеВ

Re: database startup

 
rakkesh_1970
Occasional Advisor

Re: database startup

hi yoograj,

pls find the script for u review

it works uner oracle user but not works when run through root

thanks

Rakesh


#!/bin/sh
# installation
export ORACLE_HOME=/u01/app/oracle/OraHome_1
ORACLE=oracle
export PATH=${PATH}:$ORACLE_HOME/bin
HOST=posserve.ciegroup.net
#
# change the value of ORACLE to the login name of the
# oracle owner at your site
#
#export ORACLE_HOME PATH
echo $ORACLE_HOME
su - oracle
echo "132312312312"
##
#
LOG=$ORACLE_HOME/startup2.log
touch $LOG
chmod a+r $LOG
#
case $1 in
'start')
echo "$0: starting up" >> $LOG
date >> $LOG
# Start Oracle Net
if [ -f $ORACLE_HOME/bin/tnslsnr ] ;
then
echo "starting Oracle Net listener"
$ORACLE_HOME/bin/lsnrctl start >> $LOG 2>&1 &
fi
echo "starting Oracle databases"
$ORACLE_HOME/bin/dbstart >> $LOG 2>&1
;;
'stop')
echo "$0: shutting down" >> $LOG
date >> $LOG
# Stop Oracle Net
if [ -f $ORACLE_HOME/bin/tnslsnr ] ;
then
echo "stopping Oracle Net listener"
$ORACLE_HOME/bin/lsnrctl stop >> $LOG 2>&1
fi
echo "stopping Oracle databases"
$ORACLE_HOME/bin/dbshut >> $LOG 2>&1
;;
*)
echo "usage: $0 {start|stop}".

exit
;;
esac
Yogeeraj_1
Honored Contributor

Re: database startup

Hi Rakesh,

> it works uner oracle user but not works when run through root

You would not wish to run Oracle Process as the root user!!!


Looking at the script, there is one line which must be causing an error:
su - oracle

I fear that the rest of the script might not be executed properly.

You may wish to correct the script accordingly or I can post a sample Oracle startup scripts that we use here.

revert!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
rakkesh_1970
Occasional Advisor

Re: database startup

hi yoograj,
pls publish the script


thanks
rakesh


Yogeeraj_1
Honored Contributor

Re: database startup

hi,

please find script attached.
You will need to amend accordingly.


kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: database startup

attachment
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: database startup

hi again,

the environment needs to be configured as described in the document found at:
http://docs.hp.com/en/934/startup.pdf

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)