I want to make Oracle 8i to Startup and Shutdown whenever Solaris 8
(for Intel) is broughtup and broughtdown. While I did go through
the Solaris MAN, I'm still not sure of what changes to make.
I know that the rc* files need to be changed but I dont know
which files. Here are the file structures :
C:\>pwd
/sbin
C:\>ls -l rc*
-rwxr--r-- 3 root sys 2792 Jan 5 2000 rc0
-rwxr--r-- 1 root sys 3177 Jan 5 2000 rc1
-rwxr--r-- 1 root sys 2885 Jan 5 2000 rc2
-rwxr--r-- 1 root sys 2341 Jan 5 2000 rc3
-rwxr--r-- 3 root sys 2792 Jan 5 2000 rc5
-rwxr--r-- 3 root sys 2792 Jan 5 2000 rc6
-rwxr--r-- 1 root sys 9973 Jan 5 2000 rcS
C:\>
Do u know how to get the error messages that get generated
while the system boots. In NT we normally check the event viewer. If there is a way to view the log files, then I can email
u the log file itself
THis is what I did after loggin in as root. Otherwise,
if I log in as oracle, I dont have the permission to
create files in the system folders.
[1] I created a file called /etc/init.d/oracle with the contents
#!/sbin/sh
ORACLE_HOME=/export/home/oracle/oracle817
ORACLE_BASE=/export/home/oracle
ORACLE_SID=EDM
echo $ORACLE_HOME
echo "Entered init.d oracle script "
case $1 in
start)
su - oracle -c /export/home/oracle/oracle817/bin/dbstart
su - oracle -c "/export/home/oracle/oracle817/bin/lsnrctl start"
exit 0
;;
stop)
su - oracle -c "$ORACLE_HOME/bin/lsnrctl stop"
su - oracle -c $ORACLE_HOME/bin/dbshut
;;
esac
echo "End of the oracle script - gopi"
[2] ln -s /etc/init.d/oracle /etc/rc2.d/S98oracle. Here is a listing
of the folder.
C:\>ls -l S9*
-rwxr--r-- 5 root sys 1131 Feb 23 09:19 S90wbem
-rwxr--r-- 5 root sys 391 Jan 5 2000 S92volmgt
-rwxr--r-- 2 root sys 364 Jan 5 2000 S93cacheos.finish
-rwxr--r-- 5 root sys 1181 Jan 5 2000 S94ncalogd
-rwxr--r-- 5 root sys 522 Dec 22 2000 S95ncad
lrwxrwxrwx 1 root root 16 Jul 13 20:25 S96ab2mgr -> ../init.d/ab2mgr
lrwxrwxrwx 1 root other 18 Jul 30 00:53 S98oracle -> /etc/init.d/oracle
-rwxr--r-- 5 root sys 447 Jan 5 2000 S99audit
-rwxr--r-- 5 root sys 2804 Dec 2 1999 S99dtlogin
C:\>
[3] ln -s /var/opt/oracle/oratab /etc/oratab
[4] I rebooted and expected oracle to start. But oracle fails to
start.
I dont know in which folder the solaris OS writes the messages.
I do see this line "Entered init.d oracle script " on the screen
but I dont think it is sucessfully executing the dbstart since
I dont see "End of the oracle script - gopi".
Solaris puts system messages in /var/adm/messages. What is logged there is controlled by /etc/syslog.conf
The output from your script will not get logged anywhere unless you direct it. For example, define a logfile as LOG=/tmp/start.log
and then for each command redirect standard out to the log as in
/usr/local/bin/doit.script > $LOG
Standard error (error messages) can also be redirected by adding a 2>&1 to the end as in
/usr/local/bin/doit.script > $LOG 2>&1
First thing is just exexute the scripts when the system is on and see weather it is able to start and shutdown the databases. Make sure that the scripts are doing the tasks they are supposed to do.
grajee, did you setup your env in your dbstart file? Like you said, you could mannually start the db with the script, but not the autostart, I think the difference here is the env. Try and see if it works.
Bookmarks