Return-Path: <root@fatcity.cts.com>
Received: from ensim.rackshack.net (root@localhost)
 by orafaq.net (8.11.6/8.11.6) with ESMTP id gBCLJ9i23568
 for <oracle-l@orafaq.net>; Thu, 12 Dec 2002 15:19:09 -0600
X-ClientAddr: 209.68.248.164
Received: from newsfeed.cts.com (newsfeed.cts.com [209.68.248.164])
 by ensim.rackshack.net (8.11.6/8.11.6) with ESMTP id gBCLJ9323563
 for <oracle-l@orafaq.net>; Thu, 12 Dec 2002 15:19:09 -0600
Received: from fatcity.UUCP (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id KAA40423;
 Thu, 12 Dec 2002 10:01:42 -0800 (PST)
Received: by fatcity.com (26-Feb-2001/v1.0g-b72/bab) via UUCP id 00518B01; Thu, 12 Dec 2002 08:04:08 -0800
Message-ID: <F001.00518B01.20021212080408@fatcity.com>
Date: Thu, 12 Dec 2002 08:04:08 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: "Orr, Steve" <sorr@rightnow.com>
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: "Orr, Steve" <sorr@rightnow.com>
Subject: Purging Managed Standby Database Archive Logs
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 72; ListGuru (c) 1996-2001 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: multipart/alternative;	boundary="----_=_NextPart_001_01C2A1F7.91C18C90"
------_=_NextPart_001_01C2A1F7.91C18C90
Content-Type: text/plain;
 charset="iso-8859-1"

Any one have a ready-made routine to purge the unneeded archives which have
been automagically applied to a managed standby database?

I figure it needs to: 

1. Query v$archived_log and v$log_history to get a list of the archive logs
(v$archived_log.name) where sequence# > [the max number you purged the last
time];

2. Cycle through the above list and remove the files;

3. Record the max(sequence#) from v$log_history for the next purge.


Any other ideas/suggestions?


AtDhVaAnNkCsE!!!
Steve Orr
Standing by in Bozeman, Montana

------_=_NextPart_001_01C2A1F7.91C18C90
Content-Type: text/html;
 charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>Purging Managed Standby Database Archive Logs</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Any one have a ready-made routine to purge the =
unneeded archives which have been automagically applied to a managed =
standby database?</FONT></P>

<P><FONT SIZE=3D2>I figure it needs to: </FONT>
</P>

<P><FONT SIZE=3D2>1. Query v$archived_log and v$log_history to get a =
list of the archive logs (v$archived_log.name) where sequence# &gt; =
[the max number you purged the last time];</FONT></P>

<P><FONT SIZE=3D2>2. Cycle through the above list and remove the =
files;</FONT>
</P>

<P><FONT SIZE=3D2>3. Record the max(sequence#) from v$log_history for =
the next purge.</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Any other ideas/suggestions?</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>AtDhVaAnNkCsE!!!</FONT>
<BR><FONT SIZE=3D2>Steve Orr</FONT>
<BR><FONT SIZE=3D2>Standing by in Bozeman, Montana</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C2A1F7.91C18C90--
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Orr, Steve
  INET: sorr@rightnow.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru@fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

