Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Delayed 8.1.7 Standby Database question

Re: Delayed 8.1.7 Standby Database question

From: Howard J. Rogers <hjr_at_dizwell.com>
Date: Sun, 16 Nov 2003 09:00:40 +1100
Message-ID: <3fb6a213$0$13968$afc38c87@news.optusnet.com.au>

"Francisco Javier Garcia Humphries" <fjgarcia_at_e-humphries.net> wrote in message news:bp55sj$dpm$1_at_news.ya.com...
> Thanx for your reply
>
> Maybe I didn't explain myself too clearly, I don't expect the database to
> "bang-up-to-date but only apply logs after a four hour delay". I'm
expecting
> to have the logs manualy transferd to the standby host the moment they are
> generated, and then have a cron job running in the standby host. This
script
> would wake up every minute and issue a "recover database until time
(current
> time - 4 hours)".

As I said, you can't do that. Recover until time means 'perform an incomplete recovery, and then stop, and never apply any more redo to the database'. If you want to keep the database permanently recovering, albeit with a delay of 4 hours, you must issue the 'recover standby database' command, and take care of what gets applied and what doesn't manually. There is no automated way in 8i for recovering a database at a lag, and the command you propose to issue is not doing what you think it will do.

> What i plan to achieve this way is that in case of a user error (let's say
> it drops a static table) in the primary database, the stanby database can
be
> open (maybe read-only and then kept as a standby or maybe used and then
> recreated if i have to use resetlogs and open it read-write)
>
> I understand this database will loose comitted transactions and i have
> regular well-tested backups of the primary database that i could use if i
> wanted to recover it to a current state. What i would like to know is if i
> can keep having the mounted standby database doing constant "recover until
> time"s and then open it (in a 4 hour delay state from the primary) or
finish
> recovery and then open it in a current state.

I can't make it any simpler than "no". Recover standby database is the command. Anything else is an 'apply once and then forget about doing it again' job.

You will have to manually arrange for archives to be transferred to a location, call it X, which the standby doesn't know about. You will then have to transfer archives out of X to another destination, call it Y, which the standby *does* know about. The recover standby dtaabase command will then cause everything that is in Y to be applied to the database. Your scipts will have to work out what to transfer from X to Y based on the files' timestamps, or by selecting out of your main database the v$archived_log details which give the first SCN and clock time covered by each archive. It isn't going to be easy, and it's going to have to be entirely manual.

The point I was trying to make was simply that 'recover until....' commands are used to do an incomplete recovery, not a complete recovery at a lag.

Regards
HJR
>
> Forgive me if I didn't get your point and again, thanx for the reply
>
>
> "Howard J. Rogers" <hjr_at_dizwell.com> escribió en el mensaje
> news:3fb614a8$0$13680$afc38c87_at_news.optusnet.com.au...
> >
> > "Francisco Javier Garcia Humphries" <fjgarcia_at_e-humphries.net> wrote in
> > message news:bp53ln$8iv$1_at_news.ya.com...
> > > I wan't to set up a standby database on Oracle 8.1.7. I would like
this
> > > database to be delayed 4 hours. ¿What would be the best way of doing
> this?
> > >
> > > I would like log application to be automatically managed, but i
believe
> > this
> > > is imposible until oracle 9.2 (DELAY PARAMETER OF THE
> LOG_ARCHIVE_DEST_n).
> > > To do this manually, i plan to use a script to transfer logs to the
> > standby
> > > database and another one to apply logs and use 'RECOVER DATABASE UNTIL
> > TIME
> > > (current time -4 hours)'. Is this RECOVER DATABASE UNTIL TIME a good
> > aproach
> > > or should I use the scripts to implement the delay?
> > >
> > > If i use RECOVER DATABASE UNTIL TIME, Will i be able to open the
standby
> > > database read-only without having to use RESETLOGS, or recreate it
> > > afterwards?
> > >
> > > Thanx in advance
> > >
> >
> > Recover database until time has absolutely nothing to do with updating
the
> > standby at a lag. It means 'make my database look like it did 4 hours
> ago',
> > not 'please make my database bang up-to-date but only apply the logs
after
> a
> > four hour delay'. A database recovered with an 'until' clause will have
> lost
> > committed transactions, can never become a standby again, can't be
opened
> > without a resetlogs, and has no valid backup or archives on which to
rely
> in
> > the event of another failure.
> >
> > Please don't even go down this route. Unless you take charge of the redo
> > application process yourself, there is no way that I know of of making
8i
> > updte with a delay. And what you are proposing is even worse: a
> bastardised
> > standby that is in God knows what state, and with committed transactions
> > lost to boot. A mess of the first order.
> >
> > If you want lagged standbys, upgrade to 9i. Otherwise, start scripting.
> >
> > Regards
> > HJR
> >
> >
> >
> >
> >
>
>
Received on Sat Nov 15 2003 - 16:00:40 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US