Re: Ocopy and Archived Logs

From: Jeremiah Wilton <>
Date: Sat, 12 Dec 2009 09:30:19 -0800 (PST)
Message-ID: <>

On Dec 8, 9:26 am, Gary <> wrote:
> What command can be used to show which archive log files needed to
> restore from the most recent ocopy backup? Is there such a command?

You can query something like:

from v$archived_log l,

     v$database d
where l.activation# = d.activation#
and l.next_change# <

      (select min(change#)
       from v$backup);

The above query lists all archivelogs older than the earliest startbackup  time of all datafiles. You can delete logs in this list, assuming that:

  1. You are in fact using tablespace hot backup mode. If not, then all open backups are invalid.
  2. You never want to recover to a point in time prior to the most recent backup using a prior backup
  3. You are in fact copying all files that you put into backup mode
  4. Your controlfile record keep time is longer than the age of your oldest archivelog


Jeremiah Wilton
Blue Gecko, Inc. Received on Sat Dec 12 2009 - 11:30:19 CST

Original text of this message