| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Automatic Starup of Oracle on Sun Solaris
Benhayoune khalid wrote:
>
> Add the following line to the /etc/inittab file :
>
> orastr:2:wait:my_oracle_startup_script
>
Starting Oracle from /etc/inittab is generally a bad idea, because it means the OS takes responsibility for making sure the process is always running: this causes interesting things to happen if you ever decide to shut it down manually (for example, to patch it). Also, you probably want to start Oracle at run level 3 (full multi user mode) rather than 2 (which usually has basic networking but no applications started).
To start Oracle automatically, check that /var/opt/oracle/oratab is configured with a 'Y' then place the following lines in /etc/rc3.d/S98oracle
#!/bin/sh
# oracle server startup/shutdown script
case "$1" in
'start')
echo "Starting Oracle database"
su - oracle -c "source /etc/profile; ./bin/dbstart"
echo "Starting TNS service"
su - oracle -c "source /etc/profile; ./bin/lsnrctl start listener"
;;
'stop')
echo "Stopping TNS service"
$ORACLE_HOME/bin/lsnrctl stop LISTENER
echo "Stopping Oracle database"
su - oracle -c 'source /etc/profile; ./bin/dbshut'
;;
*)
echo "Usage: S98oracle (start|stop)"
;;
# end
g
-- guy ruth hammond <grh_at_agency.com> | Happiness is a loaded weapon, and Technology / Synergy / Consulting | a short cut is better by far. 07879607148 http://www.agency.com | -- The Sisters of MercyReceived on Wed May 03 2000 - 07:01:20 CDT
![]() |
![]() |