Re: Physical Standby Database and v$Recover_file Query

From: Johne_uk <edgarj_at_tiscali.co.uk>
Date: Mon, 8 Feb 2010 07:15:08 -0800 (PST)
Message-ID: <b8e98996-d9a5-41c4-9eaa-dec0d1578577_at_m16g2000yqc.googlegroups.com>



On 8 Feb, 14:51, Johne_uk <edg..._at_tiscali.co.uk> wrote:
> On 6 Feb, 06:38, vsevolod afanassiev <vsevolod.afanass..._at_gmail.com>
> wrote:
>
> > If standby database opened in read inly mode then select from v
> > $recoverf_file will return no rows as there is nothing to recover -
> > all files are consistent.
>
> > What exactly is 'standby mode' - managed recovery mode?
>
> > Check V$DATABASE, you should gave
>
> > OPEN_MODE = 'MOUNTED'
> > DATABASE_ROLE = 'PHYSICAL STANDBY'
>
> > Are you able to test activation?
>
> Hi,
>
> It is a physical standby instance running in managed receovery mode as
> you suggest above.
>
> I have scripts that copy the generated archive logs to the remote
> standby location and applied manually.
>
> i.e. alter database register physical logfile xxxxxxxx;
>
> As well as the issue above, I have just realised something else is
> incorrect (this is the first time I've created a standby database).
>
> The archives logs are being registered but not applied. The sql below
> returned all archive logs I had registed since the instance was
> created from primary.
>
> select sequence#, applied from v$archived_log
> where applied <> 'YES'
>
> I automatically purge archive logs files older than 3 days on the
> standby server so as they have not actually been applied then it
> cannot be activated (no logs to recover from). I'm aware the Dataguard
> looks after this process but in this scenario I cannot use Dataguard.
>
> So I obviously have missed something that will apply the logs after
> they have been registered.
>
> I'm wondering if I need to issue the following command periodically to
> apply logs:-
>
> alter database recover managed standby database cancel;
> alter database recover standby database until cancel;
> alter database recover managed standby database disconnect from
> session;
>
> Would this then apply all the logs that had been registered ?
>
> Many thanks

FYI the last command I issued was :-

alter database recover managed standby database disconnect from session;

(then I start registering logs via cron jobs)

cheers Received on Mon Feb 08 2010 - 09:15:08 CST

Original text of this message