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: Help: Standby database issue

Re: Help: Standby database issue

From: Hans Forbrich <forbrich_at_telusplanet.net>
Date: Mon, 04 Jun 2001 03:37:32 GMT
Message-ID: <3B1B049B.E0DC7DBC@telusplanet.net>

Have you checked out Oracle's DataGuard? It's available on http://technet.oracle.com and sounds like it might help.

OracleMS wrote:

> eeknoch_at_gci.net (Edward Knoch) wrote in message news:<c242a22d.0105301411.240f7e98_at_posting.google.com>...
> > "ff" <cfs3526_at_ureach.com> wrote in message news:<WhKH6.7841$Aj1.3878670_at_typhoon2.ba-dsg.net>...
> > > We have a standby databse, and we use a in house developed perl script to
> > > copy the redologs from the remote production database.
> > > The way we do is we use 'ls -l' to detect the redolog file, as soon as we
> > > see it, wait for 30 seconds, and then we copy it over. Most of time it
> > > worked, but sometimes, the copy begins before the production finish writing
> > > to the redo, and we got corrupted file.
> > > Is there any way we can monitor the finish of the redologs and begin to copy
> > > only after the writing of redologs have finished?
> > >
> > > Thanks for your help.
> > >
> > > PS: Could some body show me your script for manually copy your redo logfile
> > > to remote standby database?
> > >
> > > Thanks.
>
> You can start up a Server Manager/SQL Plus session in your perl script
> and check one of two views - v$log or v$archived_log (actually, you
> can also do 'archive log list', but there's unneccessary parsing
> involved to get the sequence number of the last archived log.)
>
> In v$log, you can check the largest sequence# that has a value of YES
> in the ARCHIVED column. That is the last archived log.
> Or in v$archived_log, you can check for the max(sequence) and that
> will be your last archived log. Since you will have a certain log
> format, you can reconstruct the log filename in your script (so if
> your format is sid_sequence#.arc, then by getting the max sequence#
> from v$archived_log, you can generate the filename as
> /your/archive/dest/directory/${ORACLE_SID}_001200.arc and then copy
> all files in your archive destination that have sequence# less than
> this one over to your backup directory. . You can do a readdir() or
> glob in Perl to get the filenames in the directory. Put that in a
> while loop and you can repeat the actions for all the files. This way
> you dont have to do an 'ls -l'. If you have any problems getting this
> to work, post the specific nature of the problem and I can give you
> some code snippets. I would have given one now, but I'm late for work.
> I'm sure others will post valuable information as well. Best of luck.
Received on Sun Jun 03 2001 - 22:37:32 CDT

Original text of this message

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