-
Hi,
I need to know how to start up the database and listener automatically when the server is started.I am having SCO-unixware.
I found oratab file in /var/opt/oracle/ dir and i changed a line as
sid:$ORACLE_HOME:Y and i changed the dbstart script pointing this particular oratab file.
Now tell me how the server recogonize this dbstart program when started.
Pls. clarify me.
Thanks
M.Suresh
-
you need to add start and stop scripts in the rc* directories.
http://metalink.oracle.com/metalink/...1&p_showHelp=1
-
Fine with the documentation.How about the Listener???
-
same as database, write a shell script, leave un rc.d and add symbolic slink in rc* directories
-
Try it:
1 open the file '/et/rc.d/rc.local'
2 append these:
#modify kernel parameter
echo 134217728 > /proc/sys/kernel/shmmax
echo -e "250\t32000\t100\t128" > /proc/sys/kernel/sem
# startup oracle8.1.7.0.1
su - oracle -c 'lsnrctl start'
su - oracle -c 'dbstart'
-
I Think if we copy following script file in etc/init.d
it wil automatically startup and shutdown the database .
#!/bin/sh
# Set ORA_HOME to be equivalent to the ORACLE_HOME from
# which you wish to execute dbstart and dbshut
# set ORA_OWNER to the user id of the owner of the Oracle
# database in ORA_HOME
ORA_HOME=/opt/oracle/product/8.1.7
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart -o ! -d $ORA_HOME ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')
# Start the Oracle databases:
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart &"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start &"
;;
'stop')
# Stop the TNSlistener
pid=`/usr/bin/ps -e | /usr/bin/grep tnslsnr | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'`
if test "$pid"
then
kill $pid
fi
# Stop the Oracle databases
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut &
;;
esac
---------------------------------------------------------
i don't know if this is enough or if we need to add any links .
siva prakash
DBA
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|