Results 1 to 6 of 6
to start the Oracle DB and SAP(ERP), we did the following
su - orabit
bitesbitest:oracle> lsnrctl start
bitest:oracle> exit
and then
su - bitadm
bitest:bitadm> startsap
I always did the ...
- 08-12-2008 #1Linux Newbie
- Join Date
- Feb 2007
- Posts
- 248
script to start service automatically
to start the Oracle DB and SAP(ERP), we did the following
su - orabit
bitesbitest:oracle> lsnrctl start
bitest:oracle> exit
and then
su - bitadm
bitest:bitadm> startsap
I always did the above manually, please share the code(script) that automatically does the above at each reboot.
Regards
- 08-16-2008 #2Just Joined!
- Join Date
- Aug 2008
- Location
- Columbia, TN
- Posts
- 14
Put your commands in a script and name it whatever you want, that sounds like what it does. copy it to /etc/init.d .
cd to a multiuser level directory, probably rc3.d so you kill it accidentally when/if shifting down a multi user mode.
Make the symbolic link pointer to there. Choose an appropriate run number sequence. Look at all of the S and K script numbers and make yours after any prerequisite that your oracle requires.
Be sure to make a proper K script pointer with the same number for shutdown.
example: ln -s Existing NON-existing
ln -s ../start_my_oracle S99start_my_oracle
- 08-18-2008 #3Linux Newbie
- Join Date
- Feb 2007
- Posts
- 248
nice help
thanks
- 08-18-2008 #4Linux User
- Join Date
- May 2008
- Location
- NYC, moved from KS & MO
- Posts
- 251
Actually there are easier ways for this, what I usually do is, suppose I have a script ( it can also be a soft link to another script ) in /etc/init.d/myscript
all I need to do is:
If I don't need that script to run on boot, I simply do aCode:chkconfig -a myscript chkconfig myscript on
If you need advanced control over what other service(s) should run before myscript, add the following information between the #!/bin/bash line and your actually codes, in this example, myscript requires network and portmap to run before itself does.Code:chkconfig myscript off chkconfig -d myscript
A good place to learn more about this is to study scripts under /etc/init.d/Code:### BEGIN INIT INFO # Provides: myscript # Required-Start: $network $portmap # Required-Stop: # Default-Start: 3 5 # Default-Stop: # Short-Description: whatever myscript does # Description: longer description ### END INIT INFO
- 08-19-2008 #5Linux Newbie
- Join Date
- Feb 2007
- Posts
- 248
Hi secondmouse, excellent help.
what's the difference b/w
Required-Start: $network $portmap
and
Required-Start: network portmap
that is whats difference b/w SERVICE and $SERVICE
- 08-20-2008 #6Linux User
- Join Date
- May 2008
- Location
- NYC, moved from KS & MO
- Posts
- 251
Quoted from /etc/init.d/skeleton
When specifying hard dependencies or ordering requirements, you can
# use names of services (contents of their Provides: section)
# or pseudo names starting with a $.


Reply With Quote