RMAN backup piece corruption.

Hi,
I m having multiple databases where RMAN backup configured and scheduled. I want to know from backup piece how I can know the block corruption?

What is the version of your RMAN utility.
Try this:
Start RMAN and connect to a target database and recovery catalog (if used).
Run the BACKUP VALIDATE command.
For example, you can validate that all database files and archived logs can be backed up by running a command as shown in the following example. This command checks for physical corruptions only.
BACKUP VALIDATE
DATABASE
ARCHIVELOG ALL;
To check for logical corruptions in addition to physical corruptions, run the following variation of the preceding command:
BACKUP VALIDATE
CHECK LOGICAL
DATABASE
ARCHIVELOG ALL;
In the preceding examples, the RMAN client displays the same output that it would if it were really backing up the files. If RMAN cannot back up one or more of the files, then it issues an error message. For example, RMAN may show output similar to the following:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 08/29/2007 14:33:47
ORA-19625: error identifying file /oracle/oradata/trgt/arch/archive1_6.dbf
ORA-27037: unable to obtain file status
SVR4 Error: 2: No such file or directory
Additional information: 3
Source: http://download.oracle.com/docs/cd/B28359_01/backup.111/b28270/rcmvalid.htm (To validate files with the BACKUP VALIDATE command)

Similar Messages

  • What is RMAN backup piece ?

    Hi,
    Kindly explain me in simple terms what is rman "backup piece". Document is saying "The physical file format used to store RMAN backup sets.". What do you mean physical file format ? Little confused with this terminology.
    thanks & regards
    pjp

    You can make an analogy with tablespaces, where one tablespace must have at least one datafile, but can have one more than.
    As:
    Tablespace = backup set
    Datafile = backup piece

  • Is it possible to restore TSM/ADSM RMAN backup pieces to disk manually?

    Is it possible to restore TSM/ADSM RMAN backup pieces to disk manually, and re-catlog as disk backups?
    Oracle 10.2.0.3
    TSM client 5.5.1.1
    SUN Solaris 10 64-bit
    We are gearing up to switch from IBM's Tivoli (TSM/adsm) to EMC's Networker (Legatto), and the old TSM software drivers are going to be uninstalled.
    In a worse case scenario, we would therefore not be able to easily restore using RMAN and TSM just after the switch, and before new backups are made on Networker.
    To be comfortable with the backup methodology change, we need to explore restoring the RMAN backup pieces of a given tag using TSM commands (dsmc ?) to a filesystem, re-catalog the backup pieces now on disk, and then perform test restore/recoveries using RMAN with disk channels.
    Does anyone know of the TSM command (dsmc ?) to perform the restores of RMAN backup pieces?
    Thanks!

    This is a set of guesses and thoughts.
    1: When you say you are removing the Tivoli software drive, is this just the driver from the oracle home, or is it more substantive. In fact could you have a different oracle home to access tivoli, possible with a rman catalog copy.
    2: I dont believe the backup tag is part of the filename, however is it possilbe to query the rman catalog to get the filenames mapped to a tag?
    3: Providing you know the filenames you wish to restore then it is possible to browse the tivoli catalog. Its ages since I've done this but doesn't samc have at interactive mode
    Apologies if these suggestions are rubbish and hopefully someone gives a better answer.

  • Rman backup with corrupted block

    Hello,
    Firstly - I have problem on non-production database 11.2.0.1.0, so I am not deeply worried about data. But I need to understand what happened with database backups and how to prevent such things in future.
    So - I have EM scheduled weekly full backup and daily incremental backups. Later there was problem with hardware and some corrupted blocks in database were found. The weekly backup ran without error and obsolete backups were deleted. Now it is not possible to "recover corruption list" because no backup without corruption exists (RMAN-06023: no backup or copy of datafile 6 found to restore). I am not worried about the lost data, but I need to find out how come the backup contains corrupted block.
    I have checked the data file using dbv utility
    DBVERIFY - Verification starting : FILE = /opt/oracle/oradata/orcl/users03.dbf
    DBV-00200: Block, DBA 27525766, already marked corrupt
    csc(0x0001.7b01729f) higher than block scn(0x0000.00000000)
    Page 2359942 failed with check code 6054
    DBVERIFY - Verification complete
    Total Pages Examined         : 3840000
    Total Pages Processed (Data) : 453896
    Total Pages Failing   (Data) : 1
    Total Pages Processed (Index): 2959104
    Total Pages Failing   (Index): 0
    Total Pages Processed (Other): 424025
    Total Pages Processed (Seg)  : 0
    Total Pages Failing   (Seg)  : 0
    Total Pages Empty            : 2975
    Total Pages Marked Corrupt   : 1
    Total Pages Influx           : 0
    Total Pages Encrypted        : 0
    Highest block SCN            : 2156227446 (1.2156227446)As you can see the datafile 6 - user03.dbf has errors. Also backups now contain errors.
    1) So how is it possible that the EM scheduled backup ran without problems and the backup now contains corrupted blocks. How to prevent this in future ? I know there is setting MAXCORRUPT. How can I check its current value ? How can I configure it using EM scheduled backups ?
    2) Secondly, meanwhile I studied the RMAN commands. So I have suspended EM backup jobs, and executed follwing command. And backup ran without error again. How is this possible, if data file users06.dbf has corrupted block ?
    Thanks !
    RMAN> run {
    set MAXCORRUPT for datafile 6 to 0;
    backup as compressed backupset datafile 6;
    2> 3> 4>
    executing command: SET MAX CORRUPT
    Starting backup at 07-NOV-12
    using channel ORA_DISK_1
    using channel ORA_DISK_2
    using channel ORA_DISK_3
    using channel ORA_DISK_4
    using channel ORA_DISK_5
    channel ORA_DISK_1: starting compressed full datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    input datafile file number=00006 name=/opt/oracle/oradata/orcl/users03.dbf
    channel ORA_DISK_1: starting piece 1 at 07-NOV-12
    channel ORA_DISK_1: finished piece 1 at 07-NOV-12
    piece handle=/opt/oraBackup/rman/nrnpo0sg_1_1 tag=TAG20121107T200120 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 01:13:05
    Finished backup at 07-NOV-12
    Starting Control File and SPFILE Autobackup at 07-NOV-12
    piece handle=/opt/oraBackup/rman/c-1253245572-20121107-03 comment=NONE
    Finished Control File and SPFILE Autobackup at 07-NOV-12

    I have updated database to 11.2.0.3
    However, the problem still persists. rman backup went ok on broken file
    oracle@orcl-cluster:~> sqlplus
    SQL*Plus: Release 11.2.0.3.0 Production on Tue Nov 20 09:24:11 2012
    Copyright (c) 1982, 2011, Oracle.  All rights reserved.
    Enter user-name: system
    Enter password:
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> select * from V$DATABASE_BLOCK_CORRUPTION;
         FILE#     BLOCK#     BLOCKS CORRUPTION_CHANGE# CORRUPTIO
             6    2359942          1                  0 FRACTURED
            25    1855622          1                  0 FRACTURED
    oracle@orcl-cluster:~> rman target /
    Recovery Manager: Release 11.2.0.3.0 - Production on Tue Nov 20 08:04:57 2012
    Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.
    connected to target database: ORCL (DBID=1253245572)
    RMAN> backup as compressed backupset datafile 6;
    Starting backup at 20-NOV-12
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=1596 device type=DISK
    allocated channel: ORA_DISK_2
    channel ORA_DISK_2: SID=1568 device type=DISK
    allocated channel: ORA_DISK_3
    channel ORA_DISK_3: SID=2357 device type=DISK
    allocated channel: ORA_DISK_4
    channel ORA_DISK_4: SID=2341 device type=DISK
    allocated channel: ORA_DISK_5
    channel ORA_DISK_5: SID=86 device type=DISK
    channel ORA_DISK_1: starting compressed full datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    input datafile file number=00006 name=/opt/oracle/oradata/orcl/users03.dbf
    channel ORA_DISK_1: starting piece 1 at 20-NOV-12
    channel ORA_DISK_1: finished piece 1 at 20-NOV-12
    piece handle=/opt/oraBackup/rman/2rnqovpp_1_1 tag=TAG20121120T080513 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 01:10:35
    Finished backup at 20-NOV-12
    Starting Control File and SPFILE Autobackup at 20-NOV-12
    piece handle=/opt/oraBackup/rman/c-1253245572-20121120-00 comment=NONE
    Finished Control File and SPFILE Autobackup at 20-NOV-12
    RMAN> backup validate datafile 6;
    Starting backup at 20-NOV-12
    using channel ORA_DISK_1
    using channel ORA_DISK_2
    using channel ORA_DISK_3
    using channel ORA_DISK_4
    using channel ORA_DISK_5
    channel ORA_DISK_1: starting compressed full datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    input datafile file number=00006 name=/opt/oracle/oradata/orcl/users03.dbf
    channel ORA_DISK_1: backup set complete, elapsed time: 00:03:05
    List of Datafiles
    =================
    File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
    6    OK     1              2975         3840000         6489027926
      File Name: /opt/oracle/oradata/orcl/users03.dbf
      Block Type Blocks Failing Blocks Processed
      Data       0              453912
      Index      0              2959091
      Other      0              424022
    Finished backup at 20-NOV-12Edited by: kamilp on Nov 20, 2012 12:23 AM

  • Rman restore backup pieces to a location

    Dear all,
    10gr2p4 on solaris
    We are in the process of duplicating a RAC database to a single node
    We have all our RMAN backups to tape using veritas backup. Is there anyway I can restore the backup pieces from tape to disk on the (node where I need to duplicate)
    then using CATALOG command to catalog this backup pieces and start duplicating manually . Can I restore rman (backup pieces) in the file system of the test node ?
    Please guide
    Kai

    You can try to use LIST BACKUP to get the backup piece name and then use Veritas tool to restore the backup piece from tape to disk.

  • Information on unknown rman backup file

    Hi,
    I have RMAN backup piece, and no information on this RMAN backup piece.
    Is there any why to get the this backup piece information like which Oracle Database version the backup was fired on, database SID, backup timing and such.
    Please help me out on this.
    Regards,
    Karthik Chandran

    Hello,
    You can find some of those information in the name of the files. Most of the time, there is the SID of the database, or the timestamp of the backup. If you have the autobackup of the controlfile, you will have the DBID which will be useful to restore.
    You can also try the CATALOG command in RMAN (10g and above) to find the DBID and SID of the database that created the file. The CATALOG command itself will fail if you are not connected to the database that created the backup, but it will return you those information.
    Regarding the version, it is hard to tell.
    If you have an autobackup of the controlfile (filename begins with CF), then it is 9i or above.
    If you have OMF files (Oracle Managed Files) , then it is 10g or above.
    Hope this will help.
    Regards,

  • Restore RMAN from different Database Rman backup

    Hi Everybody
    I am practicing Rman so I have one query that how to restore rman backup from another database.
    For Example :
    1. I have Rman backup of DB1 with level 0 and level 1 cumulative database plus archievelog
    2. I need to import or restore Rman backup of DB1 to another database DB2.
    What is the procedure for doing the above queries. Please anyone one help me out.
    I have using oracle 10g r2 running in windows server 2003.
    Thanks in advance.

    These are the steps ; you need to write the appropiate commands for each step: Hope it helps!
    1) Take appropriate RMAN backup of the database db1. Note that you should turn on the CONTROLFILE AUTOBACKUP configuration so that we have the controlfile backed up after the database backup. When we restore the controlfile on new host from this autobackup piece, it will have the information of the latest backup.
    2) Create a PFILE for the destination database db2 using the database db1
    3) Move the backup pieces and the modified INIT.ORA file to the new host. Starting from 10g it is NO longer compulsory to copy the RMAN backup pieces to exactly the same location on the new host as the production location.
    4) Use the pfile created above to STARTUP NOMOUNT the database on the new host
    5) Now invoke RMAN and restore the controlfile specifying the location where the controlfile autobackup piece is restored on this new server. You can mount the database once the controlfile is restored successfully.
    6) You can skip this step if you have restored the RMAN backup pieces to exactly the same location they were backed up on database db1. If this is not the case then you need to catalog the RMAN backup pieces to make RMAN aware of thier new location on the new host. Note that CATALOG BACKUPPIECE command is available only starting from 10g.
    7) Having determined the point up to which media recovery should run, start the restore/recovery using for example:
    RMAN> run {
    2> set until sequence 59 thread 1;
    3> set newname for datafile 1 to '/new_location/system01.dbf';
    4> set newname for datafile 2 to '/new_location/undotbs01.dbf';
    5> set newname for datafile 3 to '/new_location/sysaux01.dbf';
    6> set newname for datafile 4 to '/new_location/users01.dbf';
    7> restore database;
    8> switch datafile all;
    9> recover database;
    10> }

  • Restore database to another host - I have only rman backup files

    Hi all,
    The PC where Oracle was installed is crashed.
    I have only the RMAN backup pieces in other computer.
    I want to restore/recover this RMAN backup to other PC.
    I know the commands, restore database, recover database,
    but I've always used these commands with rman into existing rman
    user. Now, I don't have anything. I have only the RMAN backup files.
    How can I restore/recover database to other PC using these files?
    The steps are? create other database, create a rman user, register
    the rman backup files in this new rman, and restore these files
    in this new database already created with the same name?
    thank you!!!!

    XM wrote:
    Hi all,
    The PC where Oracle was installed is crashed.
    I have only the RMAN backup pieces in other computer.
    I want to restore/recover this RMAN backup to other PC.
    I know the commands, restore database, recover database,
    but I've always used these commands with rman into existing rman
    user. Now, I don't have anything. I have only the RMAN backup files.
    How can I restore/recover database to other PC using these files?
    The steps are? create other database, create a rman user, register
    the rman backup files in this new rman, and restore these files
    in this new database already created with the same name?
    thank you!!!!You need to perform disaster recovery. For this, follow my step by step video tutorial:
    http://kamranagayev.wordpress.com/2010/03/29/rman-video-tutorial-series-performing-disaster-recovery-with-rman/

  • Can rman backups be used to restore to a different server

    We are using R12 with 10gr2 database
    If i take Rman backups, can they be used to restore on some other test server for cloning and bringing that test server upto date like the production.
    I am confues and dont know and This is the only reason i dont use rman for backups, instead take cold backups manually every night as they are used every week to clone some other server for testing purpose
    Please advice
    Thanks

    Hi..
    1. Copy the pfile to the new server.
    2. startup nomount the database using the pfile.
    3. Open a new RMAN session and connect to this database
    4. Restore the controlfile, this will bring the database in mount stage
    5. Once step 4 is completed, restore and recover the database.
    NOTE:-- These are the steps for restoring the database when the RMAN backup pieces are copied to the same location as they are on the main server.If you copy the rman backup to some different location, then you will have to use the CATALOG BACKUPPIECE 'location' command before restoring the database.
    Go through [http://download.oracle.com/docs/cd/B10500_01/server.920/a96566/rcmdupdb.htm]
    HTH
    Anand
    Edited by: Anand... on Dec 23, 2008 8:13 PM Added link

  • About RMAN backup !!!!

    Dear Friends,
    Let my production server running starts from 1st June .
    In 15 june , I take the First rman full (or level0) backup using the command :
    RMAN> backup database plus archivelog;
    In 20 June I take 2nd rman full backup using : RMAN> backup database plus archivelog;
    Again in 30 June , I take the Third(3rd) rman full (or level 0) backup using the command :
    RMAN> backup database plus archivelog;
    And also my rman policy set as :
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    In the above scenario , I have the following questions :
    1) When I take the Third(3rd) backup then is it the First RMAN backup goes to obsolete as per my rman policy ( RETENTION POLICY TO REDUNDANCY 1) ?
    2) Is the above all RMAN backup make a link between them ?
    3) If my first RMAN backup goes to obsolete and I have to delete the First RMAN backup , then which types of problem I face ? Can I go to previous state(suppose I need to back in 1st June) of my server if I delete First rman backup ?
    4) when I take 3rd rman full backup , then is it all information from 1st january of the server are stored in the 3rd backup ? i.e., is the 3rd rman backup stores all the previous two rman backups information ?so that If I delete the previous two backup , then I get all information form 3rd rman backup .what is the actual scenario ......
    plz help me to make clear concept about it .......
    thx in advance .....

    1) When I take the Third(3rd) backup then is it the First RMAN backup goes to obsolete as per my rman policy ( RETENTION POLICY TO REDUNDANCY 1) ?The REDUNDANCY parameter of the CONFIGURE RETENTION POLICY command specifies how many backups of each datafile and control file that RMAN should keep. In other words, if the number of backups for a specific datafile or control file exceeds the REDUNDANCY setting, then RMAN considers the extra backups as obsolete.So as in your case the redundancy is 1 so the 1st and 2nd backup are obsolete.
    To check the obsolete backups run
    rman> report obsolete;
    To delete them
    rman> delete obsolete;
    Link:[http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/setup005.htm#BRBSC400]
    Is the above all RMAN backup make a link between them ?I am not very much clear with the question.The RMAN information is stored in the controlfile.You can also create a new recovery catalog and register the target database. The RMAN repository records in the control file will be copied to the new recovery catalog.
    when I take 3rd rman full backup , then is it all information from 1st january of the server are stored in the 3rd backup ? i.e., is the 3rd rman backup stores all the previous two rman backups information ?so that If I delete the previous two backup , then I get all information form 3rd rman backupThe 3rd RMAN backup will contain all the information of the DB from the very 1st day.You will get all the information in the 3rd rman backup as its a level 0 or what we say a FULL DATABASE BACKUP.If suppose the 3rd rman backup would have been a incremental backup, then you would have required a full backup, previous to the incremental one, so that after restoring the full backup, you restore the incremental to recover the DB completely.
    Link:[http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/part1.htm#i996723]
    [http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/bkup004.htm#BRBSC133]
    Forgot to answer the 3rd question
    3) If my first RMAN backup goes to obsolete and I have to delete the First RMAN backup , then which types of problem I face ? Can I go to previous state(suppose I need to back in 1st June) of my server if I delete First rman backup ?well, i am not very much sure , but i think is , if you have the 1st rman backup pieces physically present on the disk, you can catalog it and then use the rman command to restore the data from it of till 1st june.
    To catalog the backup pieces use
    rman> catalog backuppiece 'filename';
    Link: [http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/maint007.htm]
    HTH
    Anand
    Edited by: Anand... on Oct 15, 2008 10:51 AM

  • Why does my archivelog RMAN backups end up in ORACLE_HOME/dbs ?

    DB version: 11.2
    Platform: Solaris 10
    I have noticed that , rman backup pieces containing archivelogs end up in $ORACLE_HOME/dbs directory despite using format parameter. This happened for both Level 0 AND Level 1 backups.
    I know that backup files end up in $ORACLE_HOME/dbs when you forget to specify FORMAT. But FORMAT is included in my Level0 and Level 1 Scripts as shown below. Is there anything else wrong with my L0 and L1 scripts ?
    Following are my Level0 and Level 1 backup scripts
    -- Level0
    run
    allocate channel LEVEL0_TBLQA device type disk;
    crosscheck backup;
    delete noprompt obsolete;
    backup as backupset incremental level 0 database format='/u04/dbfiles/RMAN_bkp/tblqa/TBLQA_full_%U_%T.bkp' plus archivelog delete input;
    release channel LEVEL0_TBLQA;
    }--- Level 1
    run {
    backup as compressed backupset incremental level 1 database format='/u04/dbfiles/RMAN_bkp/tblqa/TBLQA_L1_%U_%T.bkp' plus archivelog delete all input;
    }This DB is using control file as catalog.

    backup as backupset incremental level 0 database format='/u04/dbfiles/RMAN_bkp/tblqa/TBLQA_full_%U_%T.bkp' plus archivelog delete input;
    backup as compressed backupset incremental level 1 database format='/u04/dbfiles/RMAN_bkp/tblqa/TBLQA_L1_%U_%T.bkp' plus archivelog delete all input;This is because, the format you have specified stands good only till the backup of database (backup as compressed backupset incremental level 1 database format ".....") and not for the archive log in your script. Hence, the archivelog backups get stored in the $ORACLE_HOME/dbs location and the database backup gets stored in the format location you have mentioned in your RMAN script.
    Instead you can use as below:
    run
    allocate channel LEVEL0_TBLQA device type disk format '/u04/dbfiles/RMAN_bkp/tblqa/TBLQA_full_%U_%T.bkp';
    crosscheck backup;
    delete noprompt obsolete;
    backup as backupset incremental level 0 database plus archivelog delete input;
    release channel LEVEL0_TBLQA;

  • Implications of losing ArchivedLogs and RMAN Backup directory.

    DB version:10gR2
    We have a test database which is important since it is a pre-production DB used by the application team for their final testing .
    Currently this DB is not in Archivelog mode. Every night a cronjob runs to create the expdp datapump dump of the schemas in this DB.
    We want to test online RMAN backups in this DB. So we are going to put this db in ARCHIVELOG mode for a week.
    The RMAN backup pieces will be stored in +/u03/data1/orabkp+ and the Archived logs will be stored in +/u04/ach_logs+ directory.
    We want to know the impact of /u04/ach_logs , the archived logs directory getting accidently deleted. I know that the accidental deletion of RMAN backup directory shouldn't impact the normal running of the database. But we want to know the if the accidental deletion of Archived redo logs directory will impact the DB.
    Edited by: user10633418 on Sep 25, 2009 2:53 AM

    NO, it will not impact in the database. If you delete any archive log files database will run normally. But you won't restore your database in point in time. For recovery you need your full backup of all datafiles + archivelogs + online redo log files.
    For a backup policy of any production database where you don't want to lose any transaction you must reserve your archive logs files by rman backup.
    Regards
    Asif Kabir

  • Restore backup piece from tape to disk?

    Hi,
    Is it possible to restore rman backup piece from tape to disk? Please advice.
    Thanks,

    Is it possible to restore rman backup piece from tape to disk? Please advice.I dont think so it is related with ORACLE database to copy backup pieces from tape to disk.
    You might have any other vendors like veritas, Symmetrix & all. We backup an Oracle database via the TDP application to tape

  • Create Data Guard Using ASM Managed RMAN backup

    we have an oracle database 11.1.0.7 working on Windows server 2003 (64bit). The storage in ASM managed (same 11.1.0.7). Our total database size is 4TB.
    I will have to create a physical standby database (Data Guard) of this instance. Now I am having issues on how to transport my RMAN backup pieces (which is also ASM managed).
    I cannot do an over the network RMAN backup because it will take months to complete.
    We have external 4 hard disks (2 TB each). But my RMAN backup pieces are ASM in format.
    Any ideas on how to easily create a data guard in this set up.

    TheAlchemist wrote:
    can you provide us any clear steps....Hope you asked for Restoring from backups.
    1) Prepare PFILE and put in nomount status.
    2) Restore standby controlfile
    RMAN> restore standby controlfile from '+DG/...'
    3) Mount controlfile
    SQL> alter database mount standby database;
    4) Restore database.
    If you are restoring into another diskgroups, then use as below.
    RUN {
    SET NEWNAME FOR DATAFILE 1 TO '+Dg1/....';
    SET NEWNAME FOR DATAFILE 2 TO "+Dg1/...';
    RESTORE DATABASE
    If same diskgroup you want to use then, just give RMAN> restore database;
    After successful restore
    5) Start MRP
    SQL> alter database recover managed standby database disconnect from session;

  • SQL to find rman backup files required for recovery?

    Hi folks,
    I'm looking for a sql statement that I can use to query the database and return a list of the RMAN backup files needed for a successful recovery based on a SCN or a point in time. I want to do it through SQL (not though rman) because I want to script an automated refresh process. My databases are backed up online, so I would need any archive log backups done during the database backup as well. So for example...
    I do a database backup
    Then do an archive log backup.
    Pass a SQL script the lowest and highest scn numbers during the backup.
    It returns a list of the rman backup pieces needed to do a successful recovery.
    I've got a script, below, which shows the lowest and highest scn during the last full backup (all datafiles which exist have been backed up), if someone understands what I'm looking for and has done something similar, I would really appreciate any insight you may have. What I'd want to get back from the SQL is the names of the rman backup files (handles) which would be needed to get the database recovered to the highest scn during the backup.
    SELECT MIN(VBD.CHECKPOINT_CHANGE#), MAX(VBD.CHECKPOINT_CHANGE#)
    FROM V$BACKUP_DATAFILE VBD, V$DATAFILE VDF,
    (SELECT
    CREATION_CHANGE#,
    MAX(COMPLETION_TIME) COMPLETION_TIME
    FROM V$BACKUP_DATAFILE
    WHERE CREATION_CHANGE# IN (
    SELECT CREATION_CHANGE# FROM V$DATAFILE)
    GROUP BY CREATION_CHANGE#
    ) QUERY1
    WHERE VBD.CREATION_CHANGE# = VDF.CREATION_CHANGE#
    AND VBD.CREATION_CHANGE# = QUERY1.CREATION_CHANGE#
    AND VBD.COMPLETION_TIME = QUERY1.COMPLETION_TIME;
    Thanks very much for your time,
    -Adam vonNieda

    In case anyone's wondering, here's the answer. The following query returns the min and max SCN numbers contained in the last online backup.
    SELECT MIN(VBD.CHECKPOINT_CHANGE#), MAX(VBD.CHECKPOINT_CHANGE#)
    FROM V$BACKUP_DATAFILE VBD, V$DATAFILE VDF,
    (SELECT
    CREATION_CHANGE#,
    MAX(COMPLETION_TIME) COMPLETION_TIME
    FROM V$BACKUP_DATAFILE
    WHERE CREATION_CHANGE# IN (
    SELECT CREATION_CHANGE# FROM V$DATAFILE)
    GROUP BY CREATION_CHANGE#
    ) QUERY1
    WHERE VBD.CREATION_CHANGE# = VDF.CREATION_CHANGE#
    AND VBD.CREATION_CHANGE# = QUERY1.CREATION_CHANGE#
    AND VBD.COMPLETION_TIME = QUERY1.COMPLETION_TIME;
    This next one gets the session key for that backup.
    Select distinct session_key from v$backup_datafile_details
    where checkpoint_change# >= <min scn# from above> and checkpoint_change# <= <max scn# from above>;
    And finally, this one returns all files written out during that RMAN session, which includes control files, data files, and archived redo logs
    Select handle from v$backup_piece_details
    where session_key = <session key from above> order by completion_time;

Maybe you are looking for

  • Cannot install itunes on windows xp

    Hi, I am trying to install itunes on my fairly new laptop running xp service pack 3. My problem is that itunes does not install. Once the installation starts, it takes about 5 seconds, and then the message "Congratulations installation complete" appe

  • Active Vendor of an Material !!!

    Hi Guys, How we can see the number of active vendors for an Material in SAP MM,? For example I have total created vendor in system is 70 for Matrial A and I want to know that active vendors for Matrial A, how we will find out the list for the same.

  • Tomcat is not always accepting the changes

    Hi there I have tomcat 6 on a fedora core 9 and most of the time when I update some jsp files.. Tomcat is not loading the new changes.. I have to remove the whole site and then stop tomcat and started it and stop it and then copy the files back and i

  • Service Type A/R Credit Memo Based on Item Type A/R Invoice???

    Hi  Experts, How can we Raise Service Type A/R Credit Memo  for An A/R Invoice Which is Based on Item Type A/R Invoice??? We Need this Solution for A/R Invoice Which has been Claimed for Shortage but Actually No Return of Stock to us. Regards, M.Sent

  • ITunes (ext)

    Afternoon all: I downloaded iTunes 9 since then I have noticed that, the header in iTunes now reads iTunes(Ext) ***!!!. My external hard drive where I kept all my music went there with no problem. Now after this update two songs I have download (eith