Re: ARCHIVE LOG QUESTION

From: Tim Gorman <tim_at_evdbt.com>
Date: Wed, 09 Nov 2011 17:04:33 -0700
Message-ID: <4EBB1511.2060204_at_evdbt.com>



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

On 11/9/2011 2:51 PM, Denise Gwinn wrote:
> I have set up rman using flash_recovery. I've run a couple of backups
> for testing. When I do the command:
> SQL> archive log list
>
> It returns oldest online sequence of 926; next log sequence to archive
> is 928.
>
> However when I do:
> SQL> select name from v$archived_log;
>
> It returns 664 rows.
>
> Is there a graceful way to get rid of the first 661 rows?
>
> Denise Gwinn
> DBA WVNET
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Nov 09 2011 - 18:04:33 CST

Original text of this message