Oracle FAQ Your Portal to the Oracle Knowledge Grid

Home -> Community -> Usenet -> c.d.o.server -> Re: Thinking about archived redo-logs SIZE

Re: Thinking about archived redo-logs SIZE

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Tue, 17 Aug 2004 07:02:07 +0200
Message-ID: <412190be$0$18621$>

"Howard J. Rogers" <> a écrit dans le message de news:412171b6$0$11790$
> José Arango wrote:
> > Hello everyone,
> >
> > I'm trying to figure out the size of the archived redo-logs. First,
> > imagine this scenario. My redo logs are of size 10MB (each one of the
> > three I have). How can I know the percentage occupancy on these redo logs?
> > After a redo log switch, the DB switches to the other one (imagine there
> > are no transactions) how can I notice the difference between this redo log
> > (with no actual transaction) and one that is about to fill up? ...since by
> > looking at the size I can't never tell.
> >
> > Also...when the archiver moves the old redo the archive
> > destination..does it moves the complete (10MB) file to the archive
> > destination? Or does it just takes the "actual data within the file" in
> > order not to waste resources? I'm thinking it would be a waste of time
> > copying the old redo-log (full 10MB) to the archive destination since that
> > redo log doesn't have really actual transactions.
> >
> > Example: If there'a a 10MB redo log (with 20% usage)..and then occurs a
> > log switch...will the final archived redo-log be 2MB?
> >
> > Of course, I'm assuming the DB has a time interval (let's say 30 minutes)
> > in which the log switch will be performed...
> >
> > I don't have a DB with me right now so I can't test.
> >
> > Your help will be appreciated.
> >
> > Thanks,
> > Jose
> ARCn takes an intelligent copy of redo data. It does not do byte-for-byte
> copies of the online logs as 'copy' or 'cp' would do. Therefore, if you
> have 2MB actually used in a 10MB log, and you manually force a log switch,
> the resulting archive will be 2MB in size.
> There is no log switch interval on the database (unless you create one by
> scheduling a job to switch logs). Log switches otherwise only happen when
> one online log fills up, and further redo is generated which needs to be
> written somewhere.

ARCHIVE_LAG_TARGET forces a log switch after the time specified.

> If you want to know the percentage occupancy of an online redo log, you can
> delve into SYS.X$KCCCP. The column labelled CPODR_BNO shows you the Current
> Position Of the Database Redo Block Number. Multiply by (usually) 512 bytes
> to get the position in more meaningful terms. For example, if it displays
> 500, it means 256KB of redo has been written into the current log. The
> number resets at each log switch.
> Unless you are in the habit of forcing log switches by hand, you can be
> assured that the two logs of yours which are not the current redo log are
> 100% full, give or take a little slack space.
> Regards

Michel Cadot
Received on Tue Aug 17 2004 - 00:02:07 CDT

Original text of this message