Message-ID: <3ADBE3A3.9B77515A@home.com>
From: Paul Drake <paled@home.com>
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.databases.oracle.server
Subject: Re: How long should the archive log file be kept?
References: <3ADA819E.EF2B212E@ust.hk> <3ADB6EAF.B21B56AD@home.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 42
Date: Tue, 17 Apr 2001 06:33:48 GMT
NNTP-Posting-Host: 24.3.185.92
X-Complaints-To: abuse@home.net
X-Trace: news1.rdc1.nj.home.com 987489228 24.3.185.92 (Mon, 16 Apr 2001 23:33:48 PDT)
NNTP-Posting-Date: Mon, 16 Apr 2001 23:33:48 PDT
Organization: Excite@Home - The Leader in Broadband http://home.com/faster


This works:

select max(sequence#)
  from v$archived_log 
 where to_char(first_time,'RRRRMMDD HH24:MI:SS')<
       (select min(to_char(time,'RRRRMMDD HH24:MI:SS'))
          from v$backup)
/

As v$backup has the most recent time for each datafile it was placed
into backup mode.

that was a fun one.

Paul


Paul Drake wrote:
> 
> select min(backup_date) from your_most_recent_hot_backup_set
> 
> Whenever your oldest backup was taken - you need all of the archived redo logs
> since that point in time.
> (unless you intend to offline drop that datafile during recovery)
> 
> David Yeung wrote:
> 
> > We are running Oracle8i in archive mode. After each tablespace is backed up
> > with steps:
> >
> >    alter tablespace begin backup
> >    .. copy the datafiles to tapes ...
> >    alter tablespace end backup
> >
> > Can we discard the older archive log files which were created before the
> > backup?
> >
> > Usually, how long should the archive log file be kept after a full hot backup?
> >
> > Thanks
> >
> > david

