Re: Querying v$ views instead of an RMAN list or report

From: Seth Miller <sethmiller.sm_at_gmail.com>
Date: Mon, 16 Jun 2014 11:31:07 -0500
Message-ID: <CAEueRAWptqcktnzozFORAm5rn190z--RaTm7p=-UGnc+7LTExA_at_mail.gmail.com>



select handle from
(select handle, dense_rank() over (order by bs.completion_time desc) val_rank
from v$backup_piece_details bp join v$backup_set bs on (bp.bs_key = bs.recid)
where controlfile_Included = 'YES')
where val_rank = 1;

On Mon, Jun 16, 2014 at 10:17 AM, Dba DBA <oracledbaquestions_at_gmail.com> wrote:

> DB 11.2.0.4
> 1. Created a Seed DB to start with basically just get a controlfile
> 2. Run a catalog command to add the backupsets (from an SBT_TAPE device)
> 3. DB is mounted and not open since I need to recover the database first.
> 4. Using controlfile for the RMAN repository to do the recovery.
> 5. Backupsets have been 'cataloged' to the controlfile
>
> DB has full and incremental backupsets.
>
> Need to find the most recent full backup that has a controlfile so I can
> run 'restore controlfile from backupsets <backupset name>'
>
> I can get this from a 'list backupset' command, but I have to scroll
> through the report.
>
> Does anyone have a query I can use to hit the v$view to get the same thing
> without having to scroll through the rman list output? Just looking for
> something easier to read. I have been hunting around, but I'm not 100% sure
> what to look at.
>

--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jun 16 2014 - 18:31:07 CEST

Original text of this message