RMAN tablespace point -in-time recovery

Hi Experts,
while recovering TSPITR, I have received this error...
sql statement: alter database mount clone database
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 05/07/2007 05:06:12
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of sql command on clone_default channel at 05/07/2007 05:06:12
RMAN-11003: failure during parse/execution of SQL statement: alter database mount clone database
ORA-01102: cannot mount database in EXCLUSIVE mode
Please help me..
Thanks
Shaan

Is this problem on LINUX database? If so, are there multiple databases running on this server? Or the primary database name and the cloning databse name are same?
If your answer is YES to all the above questions, this is due to BUG on linux for instance locking issues.
Check the alert log of clone database, there are workaround, search on the net.
Jaffar

Similar Messages

  • Unable to recover tablespace point in time recovery

    Hi,
    I am trying to recover the tablespace point in time recovery but its throwing an error
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 04/27/2011 17:22:13
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06026: some targets not found - aborting restore
    RMAN-06024: no backup or copy of the control file found to restore
    Question: Do I need to take prior backup before doing tablespace point in time recovery.
    Please help me.

    Thanks for the info...
    I have taken the full back and tried the same scenrio, now I am getting
    contents of Memory Script:
    # shutdown clone before import
    shutdown clone immediate
    # drop target tablespaces before importing them back
    sql 'drop tablespace A including contents keep datafiles';
    executing Memory Script
    database closed
    database dismounted
    Oracle instance shut down
    sql statement: drop tablespace A including contents keep datafiles
    Removing automatic instance
    shutting down automatic instance
    target database instance not started
    Automatic instance removed
    auxiliary instance file /home/oracle/auxdest/TEST/datafile/o1_mf_temp_6vj4c78c_.tmp deleted
    auxiliary instance file /home/oracle/auxdest/TEST/onlinelog/o1_mf_3_6vj4c5nk_.log deleted
    auxiliary instance file /home/oracle/auxdest/TEST/onlinelog/o1_mf_1_6vj4c4k1_.log deleted
    auxiliary instance file /home/oracle/auxdest/TEST/datafile/o1_mf_sysaux_6vj49h7l_.dbf deleted
    auxiliary instance file /home/oracle/auxdest/TEST/datafile/o1_mf_undotbs1_6vj49hbl_.dbf deleted
    auxiliary instance file /home/oracle/auxdest/TEST/datafile/o1_mf_system_6vj49hbw_.dbf deleted
    auxiliary instance file /home/oracle/auxdest/TEST/controlfile/o1_mf_6vj49813_.ctl deleted
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 04/27/2011 18:23:02
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-03009: failure of sql command on default channel at 04/27/2011 18:23:02
    RMAN-11003: failure during parse/execution of SQL statement: drop tablespace A including contents keep datafiles
    ORA-00604: error occurred at recursive SQL level 1
    ORA-00054: resource busy and acquire with NOWAIT specified or timeout expired
    RMAN>
    Please help me

  • Tablespace Point in Time Recovery fails with RMAN-06026:

    I have cataloged with RMAN the datafiles from Snapshot backup. Still it fails with the following error.
    RMAN> RECOVER TABLESPACE TSPC UNTIL TIME "to_date('03-apr-2013 02:18:00','dd-mon-yyyy hh24:mi:ss')" AUXILIARY DESTINATION '/tmp/auxpran';
    Starting recover at 03-APR-13
    using channel ORA_DISK_1
    RMAN-05026: WARNING: presuming following set of tablespaces applies to specified point-in-time
    List of tablespaces expected to have UNDO segments
    Tablespace SYSTEM
    Tablespace UNDOTBS1
    Creating automatic instance, with SID='Ebgt'
    initialization parameters used for automatic instance:
    db_name=ORCL
    db_unique_name=Ebgt_tspitr_ORCL
    compatible=11.2.0.0.0
    db_block_size=8192
    db_files=200
    sga_target=280M
    processes=50
    db_create_file_dest=/tmp/auxpran
    log_archive_dest_1='location=/tmp/auxpran'
    #No auxiliary parameter file used
    starting up automatic instance ORCL
    Oracle instance started
    Total System Global Area 292933632 bytes
    Fixed Size 1336092 bytes
    Variable Size 100666596 bytes
    Database Buffers 184549376 bytes
    Redo Buffers 6381568 bytes
    Automatic instance created
    Running TRANSPORT_SET_CHECK on recovery set tablespaces
    TRANSPORT_SET_CHECK completed successfully
    contents of Memory Script:
    # set requested point in time
    set until time "to_date('03-apr-2013 02:18:00','dd-mon-yyyy hh24:mi:ss')";
    # restore the controlfile
    restore clone controlfile;
    # mount the controlfile
    sql clone 'alter database mount clone database';
    # archive current online log
    sql 'alter system archive log current';
    # avoid unnecessary autobackups for structural changes during TSPITR
    sql 'begin dbms_backup_restore.AutoBackupFlag(FALSE); end;';
    executing Memory Script
    executing command: SET until clause
    Starting restore at 03-APR-13
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=19 device type=DISK
    channel ORA_AUX_DISK_1: restoring control file
    channel ORA_AUX_DISK_1: copied control file copy
    input file name=/tmp/auxpran/controlbc.ctl
    output file name=/tmp/auxpran/ORCL/controlfile/o1_mf_8opkv8v4_.ctl
    Finished restore at 03-APR-13
    sql statement: alter database mount clone database
    sql statement: alter system archive log current
    sql statement: begin dbms_backup_restore.AutoBackupFlag(FALSE); end;
    contents of Memory Script:
    # set requested point in time
    set until time "to_date('03-apr-2013 02:18:00','dd-mon-yyyy hh24:mi:ss')";
    # set destinations for recovery set and auxiliary set datafiles
    set newname for clone datafile 1 to new;
    set newname for clone datafile 3 to new;
    set newname for clone datafile 2 to new;
    set newname for clone tempfile 1 to new;
    set newname for datafile 5 to
    "+DG_DATA/orcl/datafile/tspc.268.811733685";
    # switch all tempfiles
    switch clone tempfile all;
    # restore the tablespaces in the recovery set and the auxiliary set
    restore clone datafile 1, 3, 2, 5;
    switch clone datafile all;
    executing Memory Script
    executing command: SET until clause
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    renamed tempfile 1 to /tmp/auxpran/ORCL/datafile/o1_mf_temp_%u_.tmp in control file
    Starting restore at 03-APR-13
    using channel ORA_AUX_DISK_1
    One or more auxiliary set datafiles could not be removed
    Removing automatic instance
    shutting down automatic instance
    database dismounted
    Oracle instance shut down
    Automatic instance removed
    auxiliary instance file /tmp/auxpran/ORCL/controlfile/o1_mf_8opkv8v4_.ctl deleted
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 04/03/2013 02:32:55
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 2 found to restore
    RMAN-06023: no backup or copy of datafile 3 found to restore
    RMAN-06023: no backup or copy of datafile 1 found to restore
    Could anyone please reply ASAP?
    Regards,
    Pranam

    I had created a snapshot of the database(datafiles and archivelogs) and cataloged them.
    CATALOG START WITH "+TBL_DG_DATA/ORCL/DATAFILE/" NOPROMPT;
    catalog start with "+DG_ARCH/ORCL/ARCHIVELOG/" NOPROMPT;
    The time i gave was after the snapshot was created.
    When it failed the first time I created another controlfile using
    sql "alter database backup controlfile to ''/tmp/auxpran/controlbc.ctl''";
    And ran the recover command after the time after i generated this controlfile. Changed nothing else. TSPITR completed successfully. But it had failed first time. Cannot figure how it ran the second time but failed the first time.
    Removing automatic instance
    Automatic instance removed
    auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_temp_8opndd87_.tmp deleted
    auxiliary instance file /tmp/auxpran/ORCL/onlinelog/o1_mf_3_8opnd1o6_.log deleted
    auxiliary instance file /tmp/auxpran/ORCL/onlinelog/o1_mf_2_8opncy32_.log deleted
    auxiliary instance file /tmp/auxpran/ORCL/onlinelog/o1_mf_1_8opncv7d_.log deleted
    auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_sysaux_8opn516p_.dbf deleted
    auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_undotbs1_8opn4j14_.dbf deleted
    auxiliary instance file /tmp/auxpran/ORCL/datafile/o1_mf_system_8opmyvly_.dbf deleted
    auxiliary instance file /tmp/auxpran/ORCL/controlfile/o1_mf_8opmy14q_.ctl deleted
    Finished recover at 03-APR-13

  • RMAN and Point IN time recovery

    1. We have a table with bad data.
    2. We know that data was entered via the GUI exactly one week ago.
    3. I have an RMAN database full back-up that was taken the same day but before the table was screwed.
    4. the database in archivelog mode.
    5. we will be happy to restore the database in the condition before the change occured
    5. when I restore database via RMAN, and do:
    recover UNTIL TIME '16-MAR-2005';
    Oracle restore bad data, and if I put time or scn I get a message that the database incarnation is wrong!
    Is there any other way to do it?
    TIA

    Thanks Laurent! I was able to restore it only until Mar. 17?
    1. RMAN> reset database to incarnation 2;
    2. RMAN> restore database until time "timestamp '2005-03-15 00:00:00.00'";
    RMAN-03002: failure of recover command at 03/29/2005 19:44:11
    RMAN-06555: datafile 1 must be restored from backup created before 15-MAR-05
    3. My backup was created on Mar. 16, :
    RMAN> restore database until time "timestamp '2005-03-17 00:00:00.00'";
    RMAN-03002: failure of restore command at 03/29/2005 19:46:55
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 4 found to restore
    RMAN-06023: no backup or copy of datafile 3 found to restore
    4. RMAN>Restore database; OK
    5. RMAN>Recover database; internal error!
    RMAN-03002: failure of recover command at 03/29/2005 20:08:02
    ORA-00283: recovery session canceled due to errors
    RMAN-11003: failure during parse/execution of SQL statement: alter database reco
    ver logfile 'G:\ORACLE\ORA10G\FLASH_RECOVERY_DATA\ORCLSRMA\CONTROLFILE\2005_03_2
    3\O1_MF_1_14_14442T9B_.ARC'
    ORA-00283: recovery session canceled due to errors
    ORA-00600: internal error code, arguments: [3021], [1], [15], [2], [0], [419057]
    , [0], [416789]
    6. RMAN> recover database until time "timestamp '2005-03-17 00:00:00.00'"; OK
    7.RMAN> recover database until time "timestamp '2005-03-17 00:00:00.00'"; OK
    8. RMAN> alter database open resetlogs; OK
    9. RMAN> list incarnation;
    List of Database Incarnations
    DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
    1 1 ORCLSRMA 2671268838 PARENT 1 09-MAR-04
    2 2 ORCLSRMA 2671268838 PARENT 318842 01-MAR-05
    3 3 ORCLSRMA 2671268838 ORPHAN 380529 25-MAR-05
    5 5 ORCLSRMA 2671268838 CURRENT 409286 29-MAR-05
    4 4 ORCLSRMA 2671268838 ORPHAN 416789 25-MAR-05

  • Doubt about database point in time recovery using rman

    Hi Everyone,
    I have been practising various rman restore and recovery scenarios . I have a doubt regarding database point in time recovery using rman. Imagine i have a full database backup including controlfile scheduled to run at 10 PM everyday. today is 20th dec 2013. imagine i want to restore the database to a prior point in time ( say 18th dec till 8 AM). so i would restore all the datafiles  from 17th night's backup and apply archives till 8 AM of 18th dec . in this scenario should i restore the controlfile too from 17th dec bkp ( i am assuming yes we should ) or can we use the current controlfile ( assuming it is intact). i found the below from oracle docs.
    Performing Point-in-Time Recovery with a Current Control File
    The database must be closed to perform database point-in-time recovery. If you are recovering to a time, then you should set the time format environment variables before invoking RMAN. The following are sample Globalization Support settings:
    NLS_LANG = american_america.us7ascii
    NLS_DATE_FORMAT="Mon DD YYYY HH24:MI:SS"
    To recover the database until a specified time, SCN, or log sequence number:
    After connecting to the target database and, optionally, the recovery catalog database, ensure that the database is mounted. If the database is open, shut it down and then mount it:
    2.  SHUTDOWN IMMEDIATE;
    3.  STARTUP MOUNT;
    4. 
    Determine the time, SCN, or log sequence that should end recovery. For example, if you discover that a user accidentally dropped a tablespace at 9:02 a.m., then you can recover to 9 a.m.--just before the drop occurred. You will lose all changes to the database made after that time.
    You can also examine the alert.log to find the SCN of an event and recover to a prior SCN. Alternatively, you can determine the log sequence number that contains the recovery termination SCN, and then recover through that log. For example, query V$LOG_HISTORY to view the logs that you have archived. 
    RECID      STAMP      THREAD#    SEQUENCE#  FIRST_CHAN FIRST_TIM NEXT_CHANG
             1  344890611          1          1      20037 24-SEP-02      20043
             2  344890615          1          2      20043 24-SEP-02      20045
             3  344890618          1          3      20045 24-SEP-02      20046
    Perform the following operations within a RUN command:
    Set the end recovery time, SCN, or log sequence. If specifying a time, then use the date format specified in the NLS_LANG and NLS_DATE_FORMAT environment variables.
    If automatic channels are not configured, then manually allocate one or more channels.
    Restore and recover the database.
      The following example performs an incomplete recovery until November 15 at 9 a.m. 
    RUN
      SET UNTIL TIME 'Nov 15 2002 09:00:00';
      # SET UNTIL SCN 1000;       # alternatively, specify SCN
      # SET UNTIL SEQUENCE 9923;  # alternatively, specify log sequence number
      RESTORE DATABASE;
      RECOVER DATABASE;
    If recovery was successful, then open the database and reset the online logs:
    5.  ALTER DATABASE OPEN RESETLOGS;
    I did not quiet understand why the above scenario is using current controlfile as the checkpoint scn in the current controlfile and the checkpoint scn in the datafile headers do not match after the restore and recovery. Thanks in Advance for your help.
    Thanks
    satya

    Thanks for the reply ... but what about the checkpoint scn in the controlfile . my understanding is that unless the checkpoint scn in the controlfile and datafiles do not match the database will not open. so assuming the checkpoint scn in my current controlfile is 1500 and i want to recover my database till scn 1200. so the scn in the datafiles (which is 1200) is not not matching with the scn in the controlfile(1500). so will the database open in such cases.
    Thanks
    Satya

  • Rman point in time recovery

    Windows server 2003
    Oracle 10g
    Hi all please help.
    I'm doing a reorg so I exported the production schemas and droped the schemas so that I can import the data again, but I dropped one user with out exporting it first!. I have no full exports but archivelog is enabled.
    I want to do a point in time recovery :
    RMAN> RUN
    2> {
    3> SET UNTIL TIME 'DEC 12 2009 04:00:00';
    4> RESTORE DATABASE;
    5> }
    executing command: SET until clause
    using target database control file instead of recovery catalog
    Starting restore at DEC 13, 2009 13:30:53
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=541 devtype=DISK
    allocated channel: ORA_DISK_2
    channel ORA_DISK_2: sid=540 devtype=DISK
    creating datafile fno=1 name=E:\ORADATA\JDE\DATA\SYSTEM01.DBF
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 12/13/2009 13:30:58
    ORA-01180: can not create datafile 1
    ORA-01110: data file 1: 'E:\ORADATA\JDE\DATA\SYSTEM01.DBF'
    Just prior to this i did a restore/recover with a sequence nr, no problem but it didn't work, the schemas still wasn't there, so now i want to use a timestamp.
    Please help this is a production database
    RUN
    SET UNTIL sequence 5657;
    RESTORE DATABASE;
    RECOVER DATABASE;
    }

    ORA-01180: can not create datafile 1Basically this error means RMAN 'thinks, I have no backup of datafile 1 and will try to create datafile 1. Afterwards I will apply archivelogs to the newly created datafile' . But that is not possible for datafile 1.
    By the way instead of 'DEC 12 2009 04:00:00', I would always use something like
    "TO_DATE('DEC 12 2009 04:00:00','MM DD YYYY HH24:MI:SS')" .
    So you are sure the date is always interpreted correctly - independent of your default format settings.
    Werner

  • Database Point-in-time recovery

    Hi,
    When I apply a database point-in-time recovery, I open resetlogs the database so is that means I cannot use any previous backup or archive log beyond the time I have restored the database to?

    Not necessarily - it depends on your database version
    http://download.oracle.com/docs/cd/B28359_01/backup.111/b28270/rcmrvcon.htm#BRADV89712
    HTH
    Srini

  • Problem in performing multiple Point-In-Time Database Recovery using RMAN

    Hello Experts,
    I am getting an error while performing database point in time recovery multiple times using RMAN. Details are as follows :-
    Environment:
    Oracle 11g, ASM,
    Database DiskGroups : DG_DATA (Data files), DG_ARCH(Archive logs), DG_REDO(Redo logs Control file).
    Snapshot DiskGroups :
    Snapshot1 (taken at 9 am): SNAP1_DATA, SNAP1_ARCH, +SNAP1_REDO
    Snapshot2 (taken at 10 am): SNAP2_DATA, SNAP2_ARCH, +SNAP2_REDO
    Steps performed for point in time recovery:
    1. Restore control file from snapshot 2.
         RMAN> RESTORE CONTROLFILE from '+SNAP2_REDO/orcl/CONTROLFILE/Current.256.777398261';
    2. For 2nd recovery, reset incarnation of database to snapshot 2 incarnation (Say 2).
    3. Catalog data files from snapshot 1.
    4. Catalog archive logs from snapshot 2.
    5. Perform point in time recovery till given time.
         STARTUP MOUNT;
         RUN {
              SQL "ALTER SESSION SET NLS_DATE_FORMAT = ''dd-mon-yyyy hh24:mi:ss''";
              SET UNTIL TIME "06-mar-2013 09:30:00";
              RESTORE DATABASE;
              RECOVER DATABASE;
              ALTER DATABASE OPEN RESETLOGS;
    Results:
    Recovery 1: At 10.30 am, I performed first point in time recovery till 9:30 am, it was successful. Database incarnation was raised from *2* to *3*.
    Recovery 2: At 11:10 am, I performed another point in time recovery till 9:45 am, while doing it I reset the incarnation of DB to *2*, it failed with following error :-
    Starting recover at 28-FEB-13
    using channel ORA_DISK_1
    starting media recovery
    media recovery failed
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 03/06/2013 11:10:57
    ORA-00283: recovery session canceled due to errors
    RMAN-11003: failure during parse/execution of SQL statement: alter database recover if needed
    start until time 'MAR 06 2013 09:45:00'
    ORA-00283: recovery session canceled due to errors
    ORA-00313: open failed for members of log group 1 of thread 1
    ORA-00312: online log 1 thread 1: '+DG_REDO/orcl/onlinelog/group_1.257.807150859'
    ORA-17503: ksfdopn:2 Failed to open file +DG_REDO/orcl/onlinelog/group_1.257.807150859
    ORA-15012: ASM file '+DG_REDO/orcl/onlinelog/group_1.257.807150859' does not exist
    Doubts:
    1. Why did recovery failed 2nd time, but not 1st time and why is RMAN looking for online redo log group_1.257.807150859 in 2nd recovery ?
    3. I tried restoring control file from AutoBackup, in that case both 1st and 2nd recovery succeeded.
    However for this to work, I always need to keep the AutoBackup feature enabled.
    How reliable is control file AutoBackup ? Is there any alternative to using AutoBackup, can I restore control file from snapshot backup only ?
    4. If I restore control file from AutoBackup, then from what point of time/SCN does RMAN restores the control file ?
    Please help me out in this issue.
    Thanks.

    992748 wrote:
    Hello experts,
    I'm little newbie to RMAN recovery. Please help me in these doubts:
    1. If I have datafiles, archive logs & control files backup, but current online REDO logs are lost, then can I perform incomplete database recovery ?yes, if you have backups of everything else
    2. Till what maximum time/scn can incomplete database recovery be performed ??Assuming the only thing lost is the redo logs, you can recover to the last scn in the last archivelog.
    3. What is role of online REDO logs in incomplete database recovery ? They provide the final redo changes - the ones that have not been written to archivelogs
    Are they required for incomplete recovery ?It depends on how much incomplete recovery you need to do.
    Think of all of your changes as a constant stream of redo information. As a redolog fills, it is copied to archive, then (eventually) reused. over time, your redo stream is in archivelog_1, continuing into archvivelog_2, then to 3, and eventually, when you get to the last archivelog, into the online redo. A recovery will start with the oldest necessary point in the redo stream and continue forward. Whether or not you need the online redo for a PIT recovery depends on how far forward you need to recover.
    But you should take every precaution to prevent loss of online redo logs .. starting with having multiple members in each redo group ... and keeping those multiple members on physically separate disks.

  • RMAN Retention Policy - redundancy vs recovery window

    Hi All,
    I'm wondering what the most commonly used rman retention policy is, to provide point-in-time recovery. We have 2 oracle servers, one using redundancy policy (3) and the other using recovery window (2 days). I would like to standardize them but am not confident in which direction I should go in.
    I'm tempted to lean towards redundancy but wanted to pose the question to a wider, experienced audience for any things to think about/watch out for. Also, I assume the restore process would the same for either.
    Thanks in advance.

    Redundancy based retention policy means how many backups of each datafile must be retained and Recovery windows based retention policy is a period of time which starts with current time and goes backward in time upto the point of recoverability.
    Oracle suggests and its Best practice is "Recovery Window" .( I don't know the reason though)
    Two things you need to consider:
    1) You might need more space in case of "recovery window" because it depends upon the schedule of the backup. In "redundancy" , your space consumption will be same.
    2) You need to keep "recovery window" time less than the value of "control_file_Record_keep_time" so your backup records won't be overwritten in controlfile.
    We use "Recovery Window"

  • Update clone db to a point-in-time

    Hi guys,
    I am planning to implement a point in time recovery. I have a production database that I have successfully cloned by using hot backup and applying the necessary archived redo logs. I need to do this automatically daily. How can I do this? My purpose is to have a clone db that is one day delayed compared to the production database. Can I use the RECOVER DATABASE UNTIL TIME date? Is there a better/another way?
    Thanks

    Hi,
    You can use dbms_wm.SetValidTimeFilterON to specify the point in time that you are interested in.
    SQL> exec dbms_wm.SetValidTimeFilterON(to_date('05-01-2005', 'MM-DD-YYYY')) ;
    This date needs to be contained within your session's validtime range.
    Regards,
    Ben

  • Need help with Backup Recovery using Rman - Point in Time.

    Hi all,
    I am trying to recover my database to a certain point in time. Here are the details below.
    Oracle database version is. 11G R1. on 2 Node RAC. OS is AIX.
    Database name is Sales.
    Due to a mistake by the Application team, the database is written over by bad data. Now I have to restore the database in to a point in time, where the database was good.
    For this, i took a whole (full) RMAN backup, everything, all the archivelog files and Controlfiles as well.
    After doing this, i dropped the entire database. So now everything is clean.
    Now i have to restore and recover the database to this point in time.. 03/16/2011 12:45:00
    Please guide.
    The backups are located at.. /backup/sales/rman/
    I am trying various things, but each time i get the msg..
    ORA-01507: database not mounted
    I understand.. the reason for this message is the controlfile does not exist.. as the database is in mount mode. But as i said.. i have dropped the database in order to proceed with entire restoration.
    But i have taken a whole backup.. which also includes the controlfiles + archivefiles.
    Please guide.. with proper steps and commands.

    Hi,
    Priror to start with restore and recovery - Try to restore the control file from backups "/backup/sales/rman/"
    Then further you can mount the db and further carry on with recovery (catalog the backups prior to recovery)
    - Pavan Kumar N

  • RMAN restore to point in time

    Hi all,
    I am trying to restore database to point in time. But while doing this i am getting following error.
    But backups are available. Could you please help me...
    [oracle@localhost ~]$ rman target /
    Recovery Manager: Release 11.2.0.1.0 - Production on Wed Feb 13 11:54:41 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    connected to target database: ORCL (DBID=1314445644, not open)
    RMAN> run
    2> {
    3> set until time "to_date('12-02-2013 20:03:00', 'DD-MM-YYYY HH24:MI:SS')";
    4> restore database;
    5> recover database;
    6> }
    executing command: SET until clause
    Starting restore at 13-FEB-13
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=10 device type=DISK
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 02/13/2013 11:58:02
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 5 found to restore
    RMAN-06023: no backup or copy of datafile 4 found to restore
    RMAN-06023: no backup or copy of datafile 3 found to restore
    RMAN-06023: no backup or copy of datafile 2 found to restore
    RMAN-06023: no backup or copy of datafile 1 found to restore
    RMAN>

    Please find the details:
    RMAN> list backup;
    List of Backup Sets
    ===================
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    1 Full 1.04G DISK 00:03:11 12-FEB-13
    BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20130212T200534
    Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2013_02_12/o1_mf_nnndf_TAG20130212T200534_8knnsq11_.bkp
    List of Datafiles in backup set 1
    File LV Type Ckp SCN Ckp Time Name
    1 Full 832649 12-FEB-13 /u01/app/oracle/orcl/system01.dbf
    2 Full 832649 12-FEB-13 /u01/app/oracle/orcl/sysaux01.dbf
    3 Full 832649 12-FEB-13 /u01/app/oracle/orcl/undotbs01.dbf
    4 Full 832649 12-FEB-13 /u01/app/oracle/orcl/users01.dbf
    5 Full 832649 12-FEB-13 /u01/app/oracle/orcl/example01.dbf
    BS Key Type LV Size Device Type Elapsed Time Completion Time
    2 Full 9.36M DISK 00:00:04 12-FEB-13
    BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20130212T200534
    Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2013_02_12/o1_mf_ncsnf_TAG20130212T200534_8knnzzgt_.bkp
    SPFILE Included: Modification time: 12-FEB-13
    SPFILE db_unique_name: ORCL
    Control File Included: Ckp SCN: 832680 Ckp time: 12-FEB-13
    BS Key Size Device Type Elapsed Time Completion Time
    3 44.23M DISK 00:00:05 12-FEB-13
    BP Key: 3 Status: AVAILABLE Compressed: NO Tag: TAG20130212T201859
    Piece Name: /u01/app/oracle/flash_recovery_area/ORCL/backupset/2013_02_12/o1_mf_annnn_TAG20130212T201859_8knolw61_.bkp
    List of Archived Logs in backup set 3
    Thrd Seq Low SCN Low Time Next SCN Next Time
    1 3 797152 22-JUN-12 811717 22-JUN-12
    1 4 811717 22-JUN-12 832158 12-FEB-13
    1 5 832158 12-FEB-13 832625 12-FEB-13
    1 6 832625 12-FEB-13 832628 12-FEB-13
    1 7 832628 12-FEB-13 832632 12-FEB-13
    1 8 832632 12-FEB-13 834189 12-FEB-13
    RMAN> list copy;
    specification does not match any datafile copy in the repository
    specification does not match any control file copy in the repository
    List of Archived Log Copies for database with db_unique_name ORCL
    =====================================================================
    Key Thrd Seq S Low Time
    1 1 3 A 22-JUN-12
    Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2012_06_22/o1_mf_1_3_7y98vvpd_.arc
    2 1 4 A 22-JUN-12
    Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_02_12/o1_mf_1_4_8knnk9r3_.arc
    3 1 5 A 12-FEB-13
    Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_02_12/o1_mf_1_5_8knns8fs_.arc
    4 1 6 A 12-FEB-13
    Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_02_12/o1_mf_1_6_8knns9ob_.arc
    5 1 7 A 12-FEB-13
    Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_02_12/o1_mf_1_7_8knnsc0h_.arc
    6 1 8 A 12-FEB-13
    Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_02_12/o1_mf_1_8_8knoltyl_.arc
    7 1 9 A 12-FEB-13
    Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_02_12/o1_mf_1_9_8knon5bh_.arc
    8 1 10 A 12-FEB-13
    Name: /u01/app/oracle/flash_recovery_area/ORCL/archivelog/2013_02_12/o1_mf_1_10_8knpjyr7_.arc
    RMAN>

  • Recovering dropped table without using pointing time recovery/

    Hi geeks,
    Noob here.I have a question*.I want to recover the dropped table with data with out using pointing time recovery.*
    for Ex:Use hasr dropped the table at 10:00 and realized that he dropped the table at 16:00hrs .So i want to fetch the data(DDL+DML) without using pointing time recovery.
    So please find answers for my question.
    Thank you,
    Rakesh M.

    Welcome to the forum!
    Whenever you post provide your 4 digit Oracle version (result of SELECT * FROM V$VERSION).
    >
    Noob here.I have a question*.I want to recover the dropped table with data with out using pointing time recovery.*
    for Ex:Use hasr dropped the table at 10:00 and realized that he dropped the table at 16:00hrs .So i want to fetch the data(DDL+DML) without using pointing time recovery.
    >
    FLASHBACK TABLE myTable TO BEFORE DROP;
    See the examples in the FLASHBACK TABLE section of the SQL Language doc
    http://docs.oracle.com/cd/B28359_01/server.111/b28286/statements_9012.htm
    >
    Retrieving a Dropped Table: Example If you accidentally drop the pm.print_media table and want to retrieve it, then issue the following statement:
    FLASHBACK TABLE print_media TO BEFORE DROP;
    If another print_media table has been created in the pm schema, then use the RENAME TO clause to rename the retrieved table:
    FLASHBACK TABLE print_media TO BEFORE DROP RENAME TO print_media_old;
    If you know that the employees table has been dropped multiple times, and you want to retrieve the oldest version, then query the USER_RECYLEBIN table to determine the system-generated name, and then use that name in the FLASHBACK TABLE statement. (System-generated names in your database will differ from those shown here.)
    SELECT object_name, droptime FROM user_recyclebin
    WHERE original_name = 'PRINT_MEDIA';
    OBJECT_NAME DROPTIME
    RB$$45703$TABLE$0 2003-06-03:15:26:39
    RB$$45704$TABLE$0 2003-06-12:12:27:27
    RB$$45705$TABLE$0 2003-07-08:09:28:01

  • RMAN-06004:ORACLE error from recovery catalog ... ORA-00904: : invalid ...

    Good Morning All,
    One of our RMAN backups is failing with the following error message. Any suggestions would be greatly appreciated.
    ==================================================================================================
    Starting backup at 12/30/2008 22:03:47
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 12/30/2008 22:03:47
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> ##BACKUP ARCHIVELOG ALL FORMAT '%d_bkp_al_%t_Set%s_Piece%p' delete input;
    2>
    3> # DELETE ARCHIVELOG UNTIL TIME 'SYSDATE-7';
    4>
    5> # check if database can be restored
    6> # RESTORE DATABASE VALIDATE;
    7>
    8> # check if controlfile can be restored
    9> ##RESTORE CONTROLFILE to '/backups/admin/custpr/custpr_bkp_cntlfile.ctl' VALIDATE;
    10>
    11> # check if archivelogs for the past two weeks can be restored
    12> # RESTORE ARCHIVELOG FROM TIME 'SYSDATE-7' VALIDATE;
    13>
    14> # - Verify all backups on backup media are intact
    15> # CROSSCHECK BACKUP OF DATABASE;
    16>
    17> # - Display a list of files that need to be backed up based on the retention
    18> # policy. For this case study, files that don't have at least 1 backups
    19> # will be reported.
    20> REPORT NEED BACKUP;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to recovery window of 7 days
    Report of files whose recovery needs more than 7 days of archived logs
    File Days Name
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of report command at 12/30/2008 22:03:48
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> # - delete un-necessary backups. This command deletes backups based on the
    2> # retention policy.
    3> ######### commented out DELETE OBSOLETE - TSM not configured to delete on 68
    4> #########DELETE OBSOLETE;
    5>
    6> # - get complete list of existing backups
    7> LIST BACKUP;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of list command at 12/30/2008 22:03:49
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> #-end of file-
    2> **end-of-file**
    RMAN>
    Edited by: ORA_UMAIR on Dec 31, 2008 7:51 AM

    This Oracle Database is 9.2.0.6.0. Here is the complete log file. The RMAN script that I am using ran successfully many times before.
    ====================================================================================================
    Recovery Manager: Release 9.2.0.6.0 - 64bit Production
    Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
    RMAN>
    connected to recovery catalog database
    RMAN>
    connected to target database: CUSTPR (DBID=525071053)
    RMAN>
    RMAN> #########################################################################
    2> # LEVEL 0 BACKUP #
    3> #########################################################################
    4>
    5> # Configure backups to be written to disk.
    6> CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    old RMAN configuration parameters:
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    new RMAN configuration parameters:
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Set the retention policy to a recovery window of 7 days. This ensures that
    2> # RMAN retains all backups needed to recover the database to any point in time
    3> # in the last 7 days. You can use the DELETE OBSOLETE command to delete
    4> # backups that are no longer required by the retention policy. To exclude a
    5> # backup from consideration by the policy, you can use KEEP option with the
    6> # BACKUP command.
    7> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    old RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    new RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Configure RMAN to use two disk channels for backup, restore, recovery, and
    2> # maintenance operations.
    3> CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
    old RMAN configuration parameters:
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
    new RMAN configuration parameters:
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Configure RMAN to write disk backups to the /backup directory.
    2> # The format specifier %t is replaced with a 4-byte timestamp, %s with the
    3> # backup set number, and %p with the backup piece number.
    4> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
    old RMAN configuration parameters:
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
    new RMAN configuration parameters:
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Configure RMAN to back up the control file after each backup.
    2> CONFIGURE CONTROLFILE AUTOBACKUP ON;
    old RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    new RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Configure RMAN to write controlfile autobackups to the /backup directory.
    2> CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
    old RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
    new RMAN configuration parameters:
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Enable the backup optimization feature introduced in 9i to make sure that
    2> # RMAN won't backup an archivelog or datafile if there already exists a backup
    3> # of that file. The FORCE option can be used to override optimization on a
    4> # specific BACKUP command.
    5> CONFIGURE BACKUP OPTIMIZATION ON;
    old RMAN configuration parameters:
    CONFIGURE BACKUP OPTIMIZATION ON;
    new RMAN configuration parameters:
    CONFIGURE BACKUP OPTIMIZATION ON;
    new RMAN configuration parameters are successfully stored
    starting full resync of recovery catalog
    full resync complete
    RMAN>
    RMAN> # Use the SHOW ALL command to see the current configuration settings.
    2> SHOW ALL ;
    RMAN configuration parameters are:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    CONFIGURE BACKUP OPTIMIZATION ON;
    CONFIGURE DEFAULT DEVICE TYPE TO DISK;
    CONFIGURE CONTROLFILE AUTOBACKUP ON;
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '%d_bkp_cf%F';
    CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/backups/admin/custpr/%d_bkp_cf%F';
    CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 1;
    CONFIGURE DEVICE TYPE DISK PARALLELISM 1;
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
    CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
    CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
    CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' FORMAT '%d_bkp_df%t_Set%s_Piece%p';
    CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p';
    CONFIGURE MAXSETSIZE TO UNLIMITED; # default
    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/orahome2/custprdb/9.2.0/dbs/snapcf_custpr.f'; # default
    RMAN>
    RMAN> # The following commands are run each day to start the backup cycle.
    2> # The steps are:
    3> # - Take an incremental level 0 backup of the database. A level 0 backup is
    4> # a complete backup of the entire file which can be used as the basis
    5> # for a subsequent incremental backup.
    6> # - Backup all archivelogs that have not already been backed up.
    7> # - Delete on-disk archivelogs older than seven days.
    8>
    9> BACKUP INCREMENTAL LEVEL 0 FORMAT '/backups/admin/custpr/%d_bkp_df%t_Set%s_Piece%p'
    10> DATABASE maxsetsize 33G
    11> PLUS ARCHIVELOG FORMAT '/backups/admin/custpr/%d_bkp_al%t_Set%s_Piece%p'
    12> delete all input;
    Starting backup at 12/30/2008 22:01:40
    current log archived
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=11 devtype=DISK
    channel ORA_DISK_1: starting archive log backupset
    channel ORA_DISK_1: specifying archive log(s) in backup set
    input archive log thread=1 sequence=8008 recid=7910 stamp=674638862
    input archive log thread=1 sequence=8009 recid=7911 stamp=674671207
    input archive log thread=1 sequence=8010 recid=7912 stamp=674697380
    input archive log thread=1 sequence=8011 recid=7913 stamp=674780433
    input archive log thread=1 sequence=8012 recid=7914 stamp=674784211
    input archive log thread=1 sequence=8013 recid=7915 stamp=674863288
    input archive log thread=1 sequence=8014 recid=7916 stamp=674863300
    channel ORA_DISK_1: starting piece 1 at 12/30/2008 22:01:41
    channel ORA_DISK_1: finished piece 1 at 12/30/2008 22:03:47
    piece handle=/backups/admin/custpr/CUSTPR_bkp_al674863300_Set3083_Piece1 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:02:07
    channel ORA_DISK_1: deleting archive log(s)
    archive log filename=/custpr/arch/arch_custpr_8008.log recid=7910 stamp=674638862
    archive log filename=/custpr/arch/arch_custpr_8009.log recid=7911 stamp=674671207
    archive log filename=/custpr/arch/arch_custpr_8010.log recid=7912 stamp=674697380
    archive log filename=/custpr/arch/arch_custpr_8011.log recid=7913 stamp=674780433
    archive log filename=/custpr/arch/arch_custpr_8012.log recid=7914 stamp=674784211
    archive log filename=/custpr/arch/arch_custpr_8013.log recid=7915 stamp=674863288
    archive log filename=/custpr/arch/arch_custpr_8014.log recid=7916 stamp=674863300
    Finished backup at 12/30/2008 22:03:47
    Starting backup at 12/30/2008 22:03:47
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 12/30/2008 22:03:47
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> ##BACKUP ARCHIVELOG ALL FORMAT '%d_bkp_al_%t_Set%s_Piece%p' delete input;
    2>
    3> # DELETE ARCHIVELOG UNTIL TIME 'SYSDATE-7';
    4>
    5> # check if database can be restored
    6> # RESTORE DATABASE VALIDATE;
    7>
    8> # check if controlfile can be restored
    9> ##RESTORE CONTROLFILE to '/backups/admin/custpr/custpr_bkp_cntlfile.ctl' VALIDATE;
    10>
    11> # check if archivelogs for the past two weeks can be restored
    12> # RESTORE ARCHIVELOG FROM TIME 'SYSDATE-7' VALIDATE;
    13>
    14> # - Verify all backups on backup media are intact
    15> # CROSSCHECK BACKUP OF DATABASE;
    16>
    17> # - Display a list of files that need to be backed up based on the retention
    18> # policy. For this case study, files that don't have at least 1 backups
    19> # will be reported.
    20> REPORT NEED BACKUP;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to recovery window of 7 days
    Report of files whose recovery needs more than 7 days of archived logs
    File Days Name
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of report command at 12/30/2008 22:03:48
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> # - delete un-necessary backups. This command deletes backups based on the
    2> # retention policy.
    3> ######### commented out DELETE OBSOLETE - TSM not configured to delete on 68
    4> #########DELETE OBSOLETE;
    5>
    6> # - get complete list of existing backups
    7> LIST BACKUP;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of list command at 12/30/2008 22:03:49
    RMAN-06004: ORACLE error from recovery catalog database: ORA-00904: : invalid identifier
    RMAN>
    RMAN> #-end of file-
    2> **end-of-file**
    RMAN>
    Recovery Manager complete.

  • 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

  • How to control automatic rescheduling of sales order?

    Hi all, Could u please help me out to configure  to control  automatic rescheduling of sales order... eg.  I created a order on 13th March  and the material was not available, then its was kept pending.  But when the stocks got added on 19th March, 

  • Can't cable guest account in lion

    Since i istalled lion guest account disabled. I went to system pref users and groups i see guest account. i select guest account but it will not allows me to check allow guests to log in to this computer. it is gray out. ( lock is open) How can i ena

  • Basic questions about Premiere Elements 8

    I'm new to this forum and although I use Photoshop Elements extensively, I am just trialling Premiere Elements 8. I have a number of questions from my (very limited) testing so far: 1. Most of the videos that I download from my Sony DCR-DVD110 DVDs b

  • Is it possible to attach an external template for online preview?

    Hi All, I need few details regarding BPA (Bill Presentment Architecture). Here is the requirement. User have around 30 different layouts based on few codes. These layouts (report) should be available for online view in AR transaction forms. I tried u

  • Error message 06 585 and 587

    Hi, Want to know what is difference between the error message 06 585 and 06 587. What are the criteria on which system gives the above error messages when we create Purchase order. Thanks in Advance.