I want to create a script BAT file (Win environment) in which the
standby database starts-up
Before setting the standby database into " Managed " mode, I must in
my case first execute rst the " Recovery automatic standby database "
This because manually shipped loggings have to be applied first by the
automatic command
My problem is that I want to excute this in a scipt unattend BUT:
" Recovery automatic standby database " command is always waiting for
an " CANCEL " reply after the last succesfull applied log file.
Who can tell me how I can give the " CANCEL" unattended in a scipt
so that I can schedule the script?
Thanks
startup NOMOUNT pfile=C:\Oracle\ORA81\admin\pfile\init.ORA
ALTER DATABASE MOUNT STANDBY DATABASE;
RECOVER AUTOMATIC STANDBY DATABASE;
(Here I need the cancel)
RECOVER MANAGED STANDBY DATABASE;
set echo on
connect /@<tnsnames entry> as sysdba
spool c:\scripts\logapply.log
alter database recover automatic standby database until cancel;
alter database recover cancel;
spool off
exit
This is a manual standby but you get the idea
--
Niall Litchfield
Oracle DBA
Audit Commission UK
"ITAPORT06" <mok...@hotmail.com> wrote in message
news:ubbi301rq24fuc8jn...@4ax.com...
I do my automatic recovery a little different. Rather than specifying
AUTOMATIC on the command line, I let Oracle prompt me whether or not to
accept the suggested file name, then feed it a response of AUTO. When the
last available archived log is applied it automatically cancels. My
standbys are all on unix and the script looks like this. You should be
able to adapt the "here" document below to a sql script and redirect it
into a Windows version of sqlplus to achieve the same result.
sqlplus -s <<!
connect / as sysdba
startup nomount;
alter database mount standby database;
recover standby database
auto
recover managed standby database;
!
--
Chuck
Remove "_nospam" to reply by email
I tried your solution in the script but the situation is still the
same. The scripts is hanging and waiting for the manual answering of
CANCEL or AUTO
(See underneath)
I want to run the script unattended so that it will not hang. As
described in first msg under name ITAPORT06
Thanks
Statement processed.
ORA-00279: change 14285347 generated at 02/24/2004 10:44:32 needed for
thread 1
ORA-00289: suggestion :
D:\SUN_BACKUP_DATA\ORACLE_SUNL_ARC\SUNL_ARC_12199.ARC
ORA-00280: change 14285347 for thread 1 is in sequence #12199
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
I've found in some cases with windows you need to redirect the sql script
into sqlplus to get things to work. Instad of issuing a command like
"sqlplus @recover.sql", do this "sqlplus < recover.sql". Make sure the
recover.sql file contains all the commands from my previous post including
the connect.
>
>I want to run the script unattended so that it will not hang. As
>described in first msg under name ITAPORT06
NOT possible.
--
Sybrand Bakker, Senior Oracle DBA
--
Niall Litchfield
Oracle DBA
Audit Commission UK
*****************************************
Please include version and platform
and SQL where applicable
It makes life easier and increases the
likelihood of a good answer
******************************************
"Sybrand Bakker" <gooid...@sybrandb.demon.nl> wrote in message
news:o19n30d31frhmg8ld...@4ax.com...
Sybrand I was not sure with your " NOT Possible " reply if undertood
my goal well (maybe you did)
In short terms I want to give the CANCEL in the script as a answer for
RECOVER AUTOMATIC STANDBY DATABASE command so the script can continue
to set the dastabase into the " Standby Managed " mode after it has
applied the manual shipped log files.
Thanks
--
Niall Litchfield
Oracle DBA
Audit Commission UK
*****************************************
Please include version and platform
and SQL where applicable
It makes life easier and increases the
likelihood of a good answer
******************************************
<ITAPORT06> wrote in message news:403be261...@news.hccnet.nl...
I tried the following:
" alter database recover automatic standby database until cancel; "
" alter database recover cancel; "
The database still hangs after the " automatic recover " command
waiting for the log file which is not available yet.
Can only continue the script by the manual " cancel " and that is
what I want to prevent. It has to run unattended.
You told in an earlier mail that it is not hanging in your
environment. How is this possible?
Regards,
Ton
"Niall Litchfield" <niall.li...@dial.pipex.com> wrote in message news:<4044eda8$0$10131$cc9e...@news.dial.pipex.com>...
--
Niall Litchfield
Oracle DBA
Audit Commission UK
"Ton" <76434...@compuserve.com> wrote in message
news:4477604.04030...@posting.google.com...