Re: Unix Shell Script Help
Date: Sun, 15 Feb 2009 15:52:37 -0500
Message-ID: <OF6BB03864.C8F31A30-ON8525755E.00721D5B-8525755E.0072AD4E_at_lazard.com>
Thanks for your comments, Mike.
I was responding to OP's requirement of how to "CANCEL" recovery. In old days when I was cloning database outside of RMAN, I was using combination of AUTO and CANCEL to perform recovery upto last available arch log.
#!/usr/bin/ksh
#
$ORACLE_HOME/bin/sqlplus -s /nolog <<eof1
connect /as sysdba;
startup mount;
RECOVER database using backup controlfile;
auto
exit 0;
eof1
echo "database recovered with available arch logs"
$ORACLE_HOME/bin/sqlplus -s /nolog <<eof2
connect /as sysdba;
RECOVER database using backup controlfile until cancel;
cancel
exit 0;
eof2
echo "database recovered with CANCEL"
$ORACLE_HOME/bin/sqlplus -s /nolog <<eof3
WHENEVER SQLERROR EXIT 1;
connect /as sysdba;
alter database open resetlogs;
exit 0;
eof3
Thanks
Mayen
"Mike Haddon" <m.haddon_at_tx.rr.com>
Sent by: oracle-l-bounce_at_freelists.org
Feb 13 2009 06:47 PM
Please respond to
m.haddon_at_tx.rr.com
To
"oracle-l" <oracle-l_at_freelists.org>
cc
Subject
Re: Unix Shell Script Help
That will cancel before applying any archives
Mike
Mayen.Shah_at_lazard.com wrote:
#!/usr/bin/ksh
#
$ORACLE_HOME/bin/sqlplus -s /nolog <<eof1
connect /as sysdba;
RECOVER database using backup controlfile until cancel;
cancel
exit 0;
eof1
HTH
Mayen
"Bala" <oratips_at_gmail.com>
Sent by: oracle-l-bounce_at_freelists.org
Feb 12 2009 11:17 PM
Please respond to
oratips_at_gmail.com
To
"oracle-l" <oracle-l_at_freelists.org>
cc
Subject
Unix Shell Script Help
How do i supply "Cancel" in a Unix Shell script after the SQLPLUS command
RECOVER DATABASE USING BACKUP CONTROLFILE UNTIL CANCEL; any tips/ suggestions highly appreciated.
Thanks in Advance
( Hot backup, HP unix, Oracle 10.2.0.4)
-- Bala Rao -- http://www.freelists.org/webpage/oracle-lReceived on Sun Feb 15 2009 - 14:52:37 CST