dbstart script for standby database [message #339519] |
Thu, 07 August 2008 14:22  |
leahchow
Messages: 11 Registered: June 2005
|
Junior Member |
|
|
I have a Linux box which has two oracle instances, one is standby database. I want to modify $ORACLE_HOME/bin/dbstart script, link it with /etc/init.d/dbora script to startup oracle automatically when rebooting.
I added some lines in the dbstart script, like this:
if test $STATUS -eq 1 ; then
if [ -e $SPFILE -o -e $SPFILE1 -o -e $PFILE ] ; then
case $VERSION in
"6") sqldba command=startup ;;
"internal") $SQLDBA <<EOF
connect internal
startup
EOF
;;
*)
if [ "$ORACLE_SID" = 'teststby' ] ; then
$SQLDBA <<EOF
connect / as sysdba
startup nomount;
alter database mount standby database;
alter database recover managed standby database disconnect;
EOF
else
$SQLDBA <<EOF
connect / as sysdba
startup
EOF
fi
;;
esac
I just added the startup standby part, both instances couldn't be started up anymore.
Could someone help me? I didn't make changes in DBORA file.
Thanks
Leah
|
|
|
|