-
Database Autostart and Autostop.
Any one have clear instruction how to do it? Somehow Oracle instruction is not working for me.
I have 3 (three) db in oratab file with Y. but none of db start at startup. Do you have a working scripts and
linking Instructions that you can shear. It would a very kind of you.
Instructions I followed....
http://download-east.oracle.com/docs...p.htm#CFAHAHGA
Edit the oratab file for your platform.
On Solaris:
# vi /var/opt/oracle/oratab
Then I created a file in /etc/init.d called dbora
#! /bin/sh -x
#
# Change the value of ORACLE_HOME to specify the correct Oracle home
# directory for your installation.
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
#
# Change the value of ORACLE to the login name of the
# oracle owner at your site.
#
ORACLE=oracle
PATH=${PATH}:$ORACLE_HOME/bin
HOST=`hostname`
PLATFORM=`uname`
export ORACLE_HOME PATH
#
if [ ! "$2" = "ORA_DB" ] ; then
if [ "$PLATFORM" = "HP-UX" ] ; then
remsh $HOST -l $ORACLE -n "$0 $1 ORA_DB"
exit
else
rsh $HOST -l $ORACLE $0 $1 ORA_DB
exit
fi
fi
#
case $1 in
'start')
$ORACLE_HOME/bin/dbstart $ORACLE_HOME &
;;
'stop')
$ORACLE_HOME/bin/dbshut $ORACLE_HOME &
;;
*)
echo "usage: $0 {start|stop}"
exit
;;
esac
#
exit
Then.......
# chgrp dba dbora
# chmod 750 dbora
Then.....
# ln -s /etc/init.d/dbora /etc/rc3.d/K01dbora
# ln -s /etc/init.d/dbora /etc/rc3.d/S99dbora
Thanks in advance.
-
you dont say what doesnt work - try adding some debug messages in
What OS?
As the script runs as root, there are many things wrong with it anyway. Google for it, there are many many hits
-
Is the startup/shutdown script called from the correct rcx.d directory? are they executable? Are they setup to executed during the startup/shutdown?
-
OS - Solaris 10
Oracle 10g R2
============
Databases jsut wouldn't start. I'm thinking that maybe it could my env setup. But as you can see from the scripts that there is ORACLE_HOME and SID setup ( I change it according to my .profile ).
# chgrp dba dbora
# chmod 750 dbora
Then.....
# ln -s /etc/init.d/dbora /etc/rc3.d/K01dbora
# ln -s /etc/init.d/dbora /etc/rc3.d/S99dbora
-
you are trying to start things as root - cant do that
-
1.Log in as the root user.
2.Edit the oratab file.
# vi /var/opt/oracle/oratab
Code:
db1:/u01/app/oracle/product/10.2.0/dbhome:Y
db2:/u01/app/oracle/product/10.2.0/dbhome:Y
db3:/u01/app/oracle/product/10.2.0/dbhome:Y
Then still root I created a file in /etc/init.d called dbora. Like bellow….
Code:
#! /bin/sh -x
#
# Change the value of ORACLE_HOME to specify the correct Oracle home
# directory for your installation.
ORACLE_HOME=/u01/app/oracle/product/10.2.0/dbhome
#
# Change the value of ORACLE to the login name of the
# oracle owner at your site.
#
ORACLE=oracle
PATH=${PATH}:$ORACLE_HOME/bin
HOST=`hostname`
PLATFORM=`uname`
export ORACLE_HOME PATH
#
if [ ! "$2" = "ORA_DB" ] ; then
if [ "$PLATFORM" = "HP-UX" ] ; then
remsh $HOST -l $ORACLE -n "$0 $1 ORA_DB"
exit
else
rsh $HOST -l $ORACLE $0 $1 ORA_DB
exit
fi
fi
#
case $1 in
'start')
$ORACLE_HOME/bin/dbstart $ORACLE_HOME &
;;
'stop')
$ORACLE_HOME/bin/dbshut $ORACLE_HOME &
;;
*)
echo "usage: $0 {start|stop}"
exit
;;
esac
#
exit
then …
Change the group of the dbora file to the OSDBA group (typically dba), and set the permissions to 750: ( still root )
Code:
# chgrp dba dbora
# chmod 750 dbora
After that, still root..
Code:
# ln -s /etc/init.d/dbora /etc/rc3.d/K01dbora
# ln -s /etc/init.d/dbora /etc/rc3.d/S99dbora
After that reboot the system, but db just don't start at the boot. I can start manually without problems. Now you tell me what and where I did wrong?
-
stop starting the database as root
-
-
Having same problem (solaris 10, oracle 10g rel 2), did you get it sorted? I've changed relevant lines of code to be
ORA_OWNER=oracle
su - $ORA_OWNER -c $ORACLE_HOME/bin/dbstart $ORACLE_HOME &
;;
su - $ORA_OWNER -c $ORACLE_HOME/bin/dbshut $ORACLE_HOME &
;;
Also had to edit dbshut and dbstart because oratab location was wrong.
Not sure if there's anything else I should do?
-
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
|