1836636 Members
1630 Online
110102 Solutions
New Discussion

startup issue

 
navin
Super Advisor

startup issue

Hi,
I was trying to setup some scripts under the /sbin/init.d .so that the app (oracle) will start automatically. But inorder to run the script the oracle environment variable should be set or the .files should be executed by su - to oracle. How can i do this ,sure so many of you have encountered this and probably have the resolution.Thanks in advance
Learning ...
3 REPLIES 3
Sandman!
Honored Contributor

Re: startup issue

1. Install the script named oracle in the /sbin/init.d directory.

2. Make symbolic links in 2nd and 3rd run-levels for stopping/starting Oracle:

ln -s /sbin/init.d/oracle /sbin/rc3.d/S900oracle
ln -s /sbin/init.d/oracle /sbin/rc2.d/K100oracle

3. Set variable ORACLE_START_STOP=1 in the /etc/rc.config.d/oracle file
Yogeeraj_1
Honored Contributor

Re: startup issue

hi Navin

please find attached one of the great documents on this issue which i had downloaded from this site a few year ago and which i am still using for training purposes today!

hope this helps!

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: startup issue

hi again,

one easy way to get your environment variables correct is code your startup script accordingly. below an extract from one of mines:

...
'start')

# source the system configuration variables
if [ -f /etc/rc.config ] ; then
. /etc/rc.config
else
echo "ERROR: /etc/rc.config defaults file MISSING"
fi

# Check to see if this script is allowed to run...
if [ "$ORACLE_START_STOP" != 1 ]; then
rval=2
else

# Execute the commands to start your subsystem
echo "/u01/app/oracle/product/8.1.7/bin/lsnrctl start "| su - ora817
echo "/u01/app/oracle/product/8.1.7/bin/sqlplus /nolog <
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)