Re: ARCHIVE LOG QUESTION

From: Denise Gwinn <denise_at_mail.wvnet.edu>
Date: Wed, 09 Nov 2011 20:01:31 -0500
Message-ID: <4EBB226B.9090907_at_mail.wvnet.edu>



Tim,
Thank you. That certainly gives me cleaner, shorter results. Now may I physically delete those archive logs that are not listed? I get the job of cleanup crew.

Denise Gwinn
DBA WVNET On 11/9/2011 7:04 PM, Tim Gorman wrote:
> Denise,
> I'm assuming you want to change the results from the query and not
> remove the entries from V$ARCHIVED_LOG? Try...
>
> SQL> select thread#, dest_id, sequence#,
> decode(deleted,'YES','<deleted>',name) name
> 2 from (select thread#, dest_id, sequence#, name, deleted,
> row_number() over (partition by thread#, dest_id order by sequence#
> desc) rn
> 3 from v$archived_log)
> 4 where rn<= 3
> 5 order by 1, 2, 3 desc;
>
> THREAD# DEST_ID SEQUENCE# NAME
> ---------- ---------- ----------
> --------------------------------------------------------------------------------
> 1 1 64409
> /u99/oradata/PRD/archive/1_64409_677946855.arc
> 1 1 64408<deleted>
> 1 1 64407<deleted>
> 2 1 65132
> /u99/oradata/PRD/archive/2_65132_677946855.arc
> 2 1 65131
> /u99/oradata/PRD/archive/2_65131_677946855.arc
> 2 1 65130
> /u99/oradata/PRD/archive/2_65130_677946855.arc
>
>
> Not sure if that is "graceful" or not?
>
> Hope this helps? Thanks!
>
> -Tim
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Nov 09 2011 - 19:01:31 CST

Original text of this message