Re: Ocopy and Archived Logs

From: Jeremiah Wilton <jwilton_at_speakeasy.net>
Date: Sat, 12 Dec 2009 09:30:19 -0800 (PST)
Message-ID: <0d3f1fa8-a9ec-47c5-ac85-1bb063fa8a7d_at_g7g2000yqa.googlegroups.com>



On Dec 8, 9:26 am, Gary <gjwater..._at_gmail.com> 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:

select l.name
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

Regards,

Jeremiah Wilton
Blue Gecko, Inc.
http://www.bluegecko.net Received on Sat Dec 12 2009 - 11:30:19 CST

Original text of this message