Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: RECOVER AUTOMATIC STANDBY DATABASE; Script question
ITAPORT06 <mokat67_at_hotmail.com> wrote in
news:ubbi301rq24fuc8jnt7e3qulnj7av19hdn_at_4ax.com:
> WIN NT Oracle 8i
>
> 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;
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 emailReceived on Mon Feb 23 2004 - 09:30:57 CST