RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time

Hello,
i am working for a scenerio and you can see my restore script below,
RMAN> RUN
2> {
3> SET UNTIL TIME "to_date('24-05-2010 18:00:00','DD-MM-YYYY HH24:MI:SS')";
4> RESTORE DATABASE;
5> RECOVER DATABASE;
6> }
executing command: SET until clause
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of set command at 05/26/2010 11:23:24
RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
also you can see my backups,
List of Backups
===============
Key TY LV S Device Type Completion Time #Pieces #Copies Compressed Tag
89 B 1 A DISK 24-05-2010 15:36:04 1 1 NO BACKU
P_BISE1DB_000_052410030823
90 B 1 A DISK 24-05-2010 15:36:13 1 1 NO BACKU
P_BISE1DB_000_052410030823
91 B 0 A DISK 25-05-2010 12:01:09 1 1 NO TAG20
100525T113815
92 B 0 A DISK 25-05-2010 12:01:13 1 1 NO TAG20
100525T113815
93 B 1 A DISK 25-05-2010 12:01:55 1 1 NO TAG20
100525T120152
94 B 1 A DISK 25-05-2010 12:04:55 1 1 NO TAG20
100525T120451
95 B 1 A DISK 25-05-2010 13:55:00 1 1 NO TAG20
100525T134431
96 B 1 A DISK 25-05-2010 13:55:09 1 1 NO TAG20
100525T134431
97 B 1 A DISK 25-05-2010 14:01:43 1 1 NO TAG20
100525T140139
98 B 1 A DISK 25-05-2010 14:55:33 1 1 NO TAG20
100525T140356
so i am trying to understand that what is the earliest date that i can restore my database and avoid tihs error, according to the my backup sets?
thank you
Ugur

Please query the following query and specify the RESETLOGS time
SELECT RESETLOGS_TIME FROM v$database;
i cant have result with this, because database is mount state,
And post the result of the following command to provide an information about database incarnations:
RMAN>LIST INCARNATION
RMAN> list incarnation;
using target database control file instead of recovery catalog
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
1 1 BISE1DB 4092555014 PARENT 1116016 01-05-2007 16:22:55
2 2 BISE1DB 4092555014 PARENT 1226717 14-12-2007 15:28:11
3 3 BISE1DB 4092555014 PARENT 5783997202 04-05-2010 09:59:11
4 4 BISE1DB 4092555014 CURRENT 5785721070 26-05-2010 10:59:32
thank you

Similar Messages

  • How to fix RMAN-20207: UNTIL TIME is before RESETLOGS time

    Early this morning, in my haste to get a point in time restore and recovery started, I forgot to restore the controlfile as the 1st step.
    I used the current database control file, and now I have "RMAN-06004: ORACLE error from recovery catalog database: RMAN-20207: UNTIL TIME is before RESETLOGS time". I have a recovery catalog database. This is Oracle 8.1.7.4.
    Here was my script syntax:
    export ORACLE_SID=myname
    export ORACLE_HOME=/x01/oracle/product/8.1.7
    export LOG=/x01/admin/recover/point_in_time_${ORACLE_SID}_${TimeStamp}.log
    echo "Starting Time: `date`" > $LOG
    /x01/oracle/product/8.1.7/bin/rman <<! | tee -a ${LOG}
    set echo on;
    connect target
    connect catalog myuser/mypass@mycatalog
    startup nomount pfile='/x01/admin/myname/pfile/initmyname.ora';
    alter database mount;
    run {
    set until time "to_date('2006-12-02:03:00:00','yyyy-mm-dd:hh24:mi:ss')";
    allocate channel t1 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
    allocate channel t2 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
    restore database;
    recover database;
    release channel t1;
    release channel t2;
    Alter Database Open Resetlogs;
    sql "alter tablespace temp01 add tempfile ''/x01/myname/temp1/temp01_01.tmp'' SIZE 5308416 REUSE AUTOEXTEND ON NEXT 5242880 MAXSIZE 2097217536";
    sql "alter tablespace temp01 add tempfile ''/x01/myname/temp1/temp01_02.tmp'' SIZE 5308416 REUSE AUTOEXTEND ON NEXT 5242880 MAXSIZE 2097217536";
    exit
    echo "Finished Time: `date`" >> ${LOG}
    Can I do the following to try to restore the controlfile? First, I would shutdown my database.
    export ORACLE_SID=myname
    export ORACLE_HOME=/x01/oracle/product/8.1.7
    export LOG=/x01/admin/rman/recover/db_point_in_time_8i_${ORACLE_SID}_${TimeStamp}.log
    echo "Starting Time: `date`" > $LOG
    /x01/oracle/product/8.1.7/bin/rman <<! | tee -a ${LOG}
    set echo on;
    connect target
    connect catalog myuser/mypass@mycatalog
    startup nomount pfile='/x01/admin/myname/pfile/initmyname.ora';
    alter database mount;
    run {
    set until time "to_date('2006-12-02:03:00:00','yyyy-mm-dd:hh24:mi:ss')";
    allocate channel t1 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
    allocate channel t2 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
    restore controlfile to '/x01/disk/control01.ctl';
    replicate controlfile from '/x01/disk/control01.ctl';
    recover database;
    release channel t1;
    release channel t2;
    Alter Database Open Resetlogs;
    sql "alter tablespace temp01 add tempfile ''/x01/myname/temp1/temp01_01.tmp'' SIZE 5308416 REUSE AUTOEXTEND ON NEXT 5242880 MAXSIZE 2097217536";
    sql "alter tablespace temp01 add tempfile ''/x01/myname/temp1/temp01_02.tmp'' SIZE 5308416 REUSE AUTOEXTEND ON NEXT 5242880 MAXSIZE 2097217536";
    exit
    echo "Finished Time: `date`" >> ${LOG}
    I have a new incarnation of the database too -
    List of Database Incarnations
    DB Key Inc Key DB Name DB ID CUR Reset SCN Reset Time
    1 2 MYNAME 1849293826 NO 1 06-AUG-03
    1 25874 MYNAME 1849293826 NO 750748990 26-SEP-03
    1 143681 MYNAME 1849293826 NO 6610874669464 12-AUG-05
    1 265345 MYNAME 1849293826 YES 6611455777113 14-DEC-06
    What is the fastest way to fix this situation without having to restore the entire database?
    Thanks,
    Message was edited by:
    user521040

    Here is the "revised" script - I have not run this again on the Production system, but I might get a chance - finding corruption on the disk. I will test out later on a development database:
    #!/usr/bin/ksh
    TimeStamp=`date +%Y%m%d_%H%M%S`
    export ORACLE_SID=myname
    export ORACLE_HOME=/x01/oracle/product/8.1.7
    export LOG=/x01/admin/rman/recover/8i_${ORACLE_SID}_${TimeStamp}.log
    echo "Starting Time: `date`" > $LOG
    /x01/oracle/product/8.1.7/bin/rman <<! | tee -a ${LOG}
    set echo on;
    connect target
    connect catalog myuser/mypass@mycat1
    startup nomount pfile='/x01/admin/myname/pfile/initmyname.ora';
    run {
    set until time "to_date('2006-11-25:18:08:00','yyyy-mm-dd:hh24:mi:ss')";
    allocate channel t1 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
    allocate channel t2 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
    allocate channel t3 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
    allocate channel t4 type 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin/tdpo.opt)';
    restore controlfile to '/x01/disk/control01.ctl';
    replicate controlfile from '/x01/disk/control01.ctl';
    alter database mount;
    restore database;
    recover database;
    Alter Database Open Resetlogs;
    sql "alter tablespace temp01 add tempfile ''/x01/myname/temp1/temp01_01.tmp'' SIZE 5308416 REUSE AUTOEXTEND ON NEXT 5242880 MAXSIZE 20
    97217536";
    sql "alter tablespace temp01 add tempfile ''/x01/myname/temp1/temp01_02.tmp'' SIZE 5308416 REUSE AUTOEXTEND ON NEXT 5242880 MAXSIZE 20
    97217536";
    release channel t1;
    release channel t2;
    release channel t3;
    release channel t4;
    exit
    echo "Finished Time: `date`" >> ${LOG}
    Message was edited by:
    user521040

  • 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"

  • RMAN-20207/RMAN-06026 Perdictimate

    So last Friday, 16 March 2012, one of the application administrators came to me and told me that a user had deleted ~4 million rows out of a table and we need to recover the database to 15 March 2012 at 1500. So I did, after the restore I opened the database with restlogs. Now they are telling me they need it restored to 15 March 2012 at 1015 but when I do the point in time recovery to that time I get RMAN error "RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time", so I looked at my incarnations and see that I have three (20-JUL-10, 28-OCT-11, and 16-MAR-12 (CURRENT)). And when I set the incarnation back to 2 (28-OCT-11) RMAN errors out "RMAN-06026: some targets not found - aborting restore", obviously because that point in time is earlier than the point in time I'm recovering to.
    My question is, did I loose the data from my point in time recovery from 15-MAR-2012 to 28-OCT-2011 because I did the "resetlogs" option when opening the database? If I didn't how can I recover the data from 15-MAR-2012 at 1015? If I did loose my data what can I do to prevent this in the future?
    Note: I'm still learning Oracle/RMAN after inheriting this position when the last guy left.

    I've actually got the control file backup twice in my backup script......
    03/16/2012 04:51 PM 8,355,840 CTLFILE_C-339128723-20120316-03.BCK
    03/16/2012 04:56 PM 8,355,840 CTLFILE_C-339128723-20120316-04.BCK
    03/17/2012 01:12 AM 8,355,840 CTLFILE_C-339128723-20120317-00.BCK
    03/17/2012 01:14 AM 8,355,840 CTLFILE_C-339128723-20120317-01.BCK
    03/18/2012 02:54 AM 8,355,840 CTLFILE_C-339128723-20120318-00.BCK
    03/18/2012 02:55 AM 8,355,840 CTLFILE_C-339128723-20120318-01.BCK
    03/19/2012 01:12 AM 8,355,840 CTLFILE_C-339128723-20120319-00.BCK
    03/19/2012 01:13 AM 8,355,840 CTLFILE_C-339128723-20120319-01.BCK
    03/20/2012 01:12 AM 8,355,840 CTLFILE_C-339128723-20120320-00.BCK
    03/20/2012 01:13 AM 8,355,840 CTLFILE_C-339128723-20120320-01.BCK
    03/21/2012 01:13 AM 8,355,840 CTLFILE_C-339128723-20120321-00.BCK
    03/21/2012 01:15 AM 8,355,840 CTLFILE_C-339128723-20120321-01.BCK
    03/22/2012 01:12 AM 8,355,840 CTLFILE_C-339128723-20120322-00.BCK
    03/22/2012 01:14 AM 8,355,840 CTLFILE_C-339128723-20120322-01.BCK
    But why would the control file backups prior to my PIT restore go missing? This is bothering, I checked my most recent backup logs and didn't see anything that deletes the control files and all my backups from before my PIT restore and before are there without the control files. Did RMAN think they were bad, or not needed and then deleted them?

  • RMAN-20207

    Hi,
    Db :11.2.0.1
    We getting the belo error while execute restore script
    oracle@plm-a33:/u01/app/oracle/11.2.0.1/Bkp_test/Old/Refresh/longest: cat restore_longest_100905*
    Recovery Manager: Release 11.2.0.1.0 - Production on Mon Sep 10 05:02:19 2012
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    RMAN> connect target *
    2> RUN
    3> {
    4> allocate channel t1 type 'SBT_TAPE' parms 'ENV=(LEO_buffersize=1048576,LS_PFILE=/u01/app/oracle/11.2.0.1/product/rdbms/oraclehome/Quest/LEO/param.txt)';
    5> allocate channel t2 type 'SBT_TAPE' parms 'ENV=(LEO_buffersize=1048576,LS_PFILE=/u01/app/oracle/11.2.0.1/product/rdbms/oraclehome/Quest/LEO/param.txt)';
    6> RESTORE DATABASE until time "to_date('2012-09-08-19:15','YYYY-MM-DD-HH24:MI')";
    7> release channel t1;
    8> release channel t2;
    9> }
    10>
    11>
    connected to target database: p261 (DBID=1429245374, not open)
    using target database control file instead of recovery catalog
    allocated channel: t1
    channel t1: SID=5659 device type=SBT_TAPE
    channel t1: LiteSpeed Engine for Oracle v2.2.1.1013
    allocated channel: t2
    channel t2: SID=5782 device type=SBT_TAPE
    channel t2: LiteSpeed Engine for Oracle v2.2.1.1013
    Starting restore at 10-SEP-12
    released channel: t1
    released channel: t2
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 09/10/2012 05:02:22
    RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time
    Recovery Manager complete.
    oracle@plm-a33:/u01/app/oracle/11.2.0.1/Bkp_test/Old/Refresh/longest: rman target /
    Recovery Manager: Release 11.2.0.1.0 - Production on Mon Sep 17 13:57:16 2012
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    connected to target database: p261 (DBID=1429245374, not open)
    RMAN> list incarnation;
    using target database control file instead of recovery catalog
    List of Database Incarnations
    DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
    1 1 p261 1429245374 PARENT 5515926705917 19-SEP-12
    2 2 p261 1429245374 PARENT 5515926731900 19-SEP-12
    3 3 p261 1429245374 CURRENT 5515927706621 15-OCT-12
    RMAN>
    Thanks & Regards,
    VN

    5> allocate channel t2 type 'SBT_TAPE' parms 'ENV=(LEO_buffersize=1048576,LS_PFILE=/u01/app/oracle/11.2.0.1/product/rdbms/oraclehome/Quest/LEO/param.txt)';
    6> RESTORE DATABASE until time "to_date('*2012-09-08*-19:15','YYYY-MM-DD-HH24:MI')";
    RMAN> list incarnation;
    using target database control file instead of recovery catalog
    List of Database Incarnations
    DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
    1 1 p261 1429245374 PARENT 5515926705917 19-SEP-12
    2 2 p261 1429245374 PARENT 5515926731900 19-SEP-12
    *3 3 p261 1429245374 CURRENT 5515927706621 15-OCT-12*you are trying to restore the database to the date Aug 08, but you cannot restore your database older than Oct 15....so until time clause should always be more than Oct 15......
    another option is set the incarnation to old incarnation and try using until time accordingly

  • RMAN Recovery window and Redundancy

    Hi,
    I am using Oracle 11g (11.2.0.1) in windows 2003 server. In RMAN is it possible to set both the below mentioned configuration in effect or anyone of the configuration can only be used?
    RMAN>CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    RMAN>CONFIGURE RETENTION POLICY TO REDUNDANCY 2;
    Regards,
    007

    No it is not possible.
    007 wrote:
    hi oradb,
    Thanks for your reply. i want both the RMAN configuration policy to be applied. Is the possible???
    regards,
    007hi oradb,
    Thanks for your reply. i want both the RMAN configuration policy to be applied. Is the possible???
    regards,
    007

  • What's the difference between redundancy and recovery window for retention?

    Hello all,
    I'm still trying to get a grip on this concept for RMAN backup planning.
    I recently ran into a situation as follows.
    I have the backups set to a redundancy of 1.
    I have instance1, which had GRID jobs to run RMAN backups as follows
    Incremental database level=0 weekly at Wed at 2:30am
    I have daily backups, incremental level=1 each evening
    I have archive log backups through the day.
    What happened, was that apparently on a Tues some time, the development team deleted data from almost every table in their schema.
    The didn't discover this till midday or so on Wednesday.
    I went to try to restore...and RMAN couldn't do it. I had found a SCN for early the Tues they did it...but I got the following error:
    RMAN> RUN
    2> {
    3> SET UNTIL SCN 4590383198282;
    4> RESTORE DATABASE;
    5> RECOVER DATABASE;
    6> }
    executing command: SET until clause
    Starting restore at 28-APR-10
    allocated channel: ORA_SBT_TAPE_1
    channel ORA_SBT_TAPE_1: SID=639 device type=SBT_TAPE
    channel ORA_SBT_TAPE_1: NMO v4.5.0.0
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=638 device type=DISK
    creating datafile file number=1 name=+DATADG/instance1/datafile/system.284.697137287
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 04/28/2010 15:53:00
    ORA-01180: can not create datafile 1
    ORA-01110: data file 1: '+DATADG/instance1/datafile/system.284.697137287'
    From what research I did...it appears that since I did not have a level=0 incremental from before, it could not reset the database back in time. The previous one had been deleted since, I guess I had a redundancy of 1.
    So, I thought I had a week backup they way I have it set..but that assumes that errors are found pretty quickly before the next level=0 backup.
    I want at least 1 to 1.5 weeks worth of backups. I do have the problem that we do not have many tapes in rotation, so I cannot go for too long...may 2x weeks tops.
    I'm trying to rethink my strategy, but I'm confused as I read as to the difference between setting RMAN retention with redundancy vs recovery window.
    Can someone give me an explanation how you understand it? I'm reading on the web and in oracle books, and for some reason, it just isn't clear to me what is the best way to go....especially when I see that redundancy and recovery window might both be set??
    Thank you in advance,
    cayenne

    Dear Cayenne
    AFAIK RMAN doesn't claim that "you haven't enough backup". Please read the error you got carefully
    ORA-01180: can not create datafile 1
    ORA-01110: data file 1: '+DATADG/instance1/datafile/system.284.697137287'
    and check the following link:
    ORA-01180: Cannot create datafile 1 when doing RMAN restore onto 2nd server
    Moreover, could you please use LIST BACKUP command and see whether you have enough backups?
    Read "Redundancy Based Backup Retention Policy" from the following link:
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14192/strategy003.htm#sthref139

  • CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 0 DAYS;

    Hi Guys
    Can you please put some light on the 0 days. what is the meaning on 0 days and how does this work.
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 0 DAYS; If I take full backup every night how many backup will it contain and how will it obsolete the backup.
    RMan 9i R2
    Soalris 5.9
    I understand the concept if recover window is 1 or more days but confuse with 0 days.
    Thank you in advance.

    RECOVERY WINDOW OF 0 DAYS is effective like REDUNDANCY 1.
    RMAN> configure retention policy to recovery window of 0 days;
    old RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    new RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 0 DAYS;
    new RMAN configuration parameters are successfully stored
    RMAN> backup datafile 4;
    Starting backup at 09-SEP-07
    using target database controlfile instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: sid=15 devtype=DISK
    channel ORA_DISK_1: starting full datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    input datafile fno=00004 name=E:\ORACLE\ORADATA\WIN9I\DRSYS01.DBF
    channel ORA_DISK_1: starting piece 1 at 09-SEP-07
    channel ORA_DISK_1: finished piece 1 at 09-SEP-07
    piece handle=E:\ORACLE\ORA92\DATABASE\0BIRHB2F_1_1 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
    Finished backup at 09-SEP-07
    RMAN> report obsolete;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to recovery window of 0 days
    no obsolete backups found
    RMAN> backup datafile 4;
    Starting backup at 09-SEP-07
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting full datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    input datafile fno=00004 name=E:\ORACLE\ORADATA\WIN9I\DRSYS01.DBF
    channel ORA_DISK_1: starting piece 1 at 09-SEP-07
    channel ORA_DISK_1: finished piece 1 at 09-SEP-07
    piece handle=E:\ORACLE\ORA92\DATABASE\0CIRHB4Q_1_1 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
    Finished backup at 09-SEP-07
    RMAN> report obsolete;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to recovery window of 0 days
    Report of obsolete backups and copies
    Type                 Key    Completion Time    Filename/Handle
    Backup Set           10     09-SEP-07
      Backup Piece       10     09-SEP-07          E:\ORACLE\ORA92\DATABASE\0BIRHB2F_1_1
    RMAN> delete backup;
    using channel ORA_DISK_1
    List of Backup Pieces
    BP Key  BS Key  Pc# Cp# Status      Device Type Piece Name
    10      10      1   1   AVAILABLE   DISK        E:\ORACLE\ORA92\DATABASE\0BIRHB2F_1_1
    11      11      1   1   AVAILABLE   DISK        E:\ORACLE\ORA92\DATABASE\0CIRHB4Q_1_1
    Do you really want to delete the above objects (enter YES or NO)? yes
    deleted backup piece
    backup piece handle=E:\ORACLE\ORA92\DATABASE\0BIRHB2F_1_1 recid=10 stamp=632859727
    deleted backup piece
    backup piece handle=E:\ORACLE\ORA92\DATABASE\0CIRHB4Q_1_1 recid=11 stamp=632859802
    Deleted 2 objects
    RMAN> configure retention policy to redundancy 1;
    old RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 0 DAYS;
    new RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
    new RMAN configuration parameters are successfully stored
    RMAN> backup datafile 4;
    Starting backup at 09-SEP-07
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting full datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    input datafile fno=00004 name=E:\ORACLE\ORADATA\WIN9I\DRSYS01.DBF
    channel ORA_DISK_1: starting piece 1 at 09-SEP-07
    channel ORA_DISK_1: finished piece 1 at 09-SEP-07
    piece handle=E:\ORACLE\ORA92\DATABASE\0DIRHB90_1_1 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
    Finished backup at 09-SEP-07
    RMAN> report obsolete;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to redundancy 1
    no obsolete backups found
    RMAN> backup datafile 4;
    Starting backup at 09-SEP-07
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting full datafile backupset
    channel ORA_DISK_1: specifying datafile(s) in backupset
    input datafile fno=00004 name=E:\ORACLE\ORADATA\WIN9I\DRSYS01.DBF
    channel ORA_DISK_1: starting piece 1 at 09-SEP-07
    channel ORA_DISK_1: finished piece 1 at 09-SEP-07
    piece handle=E:\ORACLE\ORA92\DATABASE\0EIRHB9H_1_1 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
    Finished backup at 09-SEP-07
    RMAN> report obsolete;
    RMAN retention policy will be applied to the command
    RMAN retention policy is set to redundancy 1
    Report of obsolete backups and copies
    Type                 Key    Completion Time    Filename/Handle
    Backup Set           12     09-SEP-07
      Backup Piece       12     09-SEP-07          E:\ORACLE\ORA92\DATABASE\0DIRHB90_1_1
    RMAN>

  • Recovery Window-Based Retention VS Redundancy-Based Retention

    Hi Experts,
    We'd like to know your take on the use of Recovery Window-Based Retention Policy e.g.
    RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;against the use of Redundancy-Based Retention Policy, e.g.
    CONFIGURE RETENTION POLICY TO REDUNDANCY 7;Do you have any recommendations or preferences to which should be used? Is there a preferred method by oracle?
    We're currently setting up RMAN for a client that's using Oracle 11.1.0.7 standard edition, so is there a preference to what's better suited for the standard edition? The plan is to back up data to Disk, and this data will be then backed up to tape.
    Thanks

    REDUNDANCY 7 is 7 backups -- irrespective of the number of days.
    If you are running only 1 backup a day, you'd assume that it is equivalent to 7 days. However, if one day you run a backup twice, then the 7-day old backup becomes redundant ! If, the next day, you again run the backup twice, the 5-day old backup becomes redundant ! (Conversely, if you don't run a backup for 2 days, then even the 9 day old backup is not redundant !).
    So, be aware (or beware) that any adhoc backup runs or changes to the backup frequency would change your retention duration (and if this happens 6 months from now, the IT Manager / DBA onsite may not know that retention has changed !)
    Hemant K Chitae

  • Purpose of Retention Policy Recovery Window and Redundancy

    Hi,
    Good Evening,
    I have some queries regarding the RMAN Retention Policy Recovery Window and Redundancy.
    1. Any condition is there to set the Retention Policy Recovery Window and Redundancy and control_file_record_keep_time?What is the relationship between these 3 parameters?
    2. Explain the scenario if i set the control_file_record_keep_time=4 Redundancy=3 and Recovery Window=7?
    3. If i set the Redundancy=3 and Recovery Window=7 means my backup place only have 3 copies of backup based on the redundancy then what is the purpose of Recovery Window=7 please give some example.
    4. If i change the values for Recovery Window=3 and Redundancy=7 what will happened, how many days backup will be available in my FRA location?Explain with one scenario?
    Thanks in advance.
    Vijay.

    Hi,
    Take a look of the above doc contents:
    Configuring the Backup Retention Policy
    As explained in "Backup Retention Policies", the backup retention policy specifies which backups must be retained to meet your data recovery requirements. This policy can be based on a recovery window or redundancy. Use the CONFIGURE RETENTION POLICY command to specify the retention policy.
    so  you have option to choose either  recovery windows or redundancy based you can set the configuration like
    read in the Doc What it said for both:
    Recovery Window-Based Retention Policy ==>RMAN does not consider any full or level 0 incremental backup as obsolete if it falls within the recovery window.  Additionally, RMAN retains all archived logs and level 1 incremental backups that are needed to recover to a random point within the window.
    Redundancy-Based Retention Policy==>The REDUNDANCY parameter of the CONFIGURE RETENTION POLICY command specifies how many full or level 0 backups of each datafile and control file that RMAN should keep. If the number of full or level 0 backups for a specific datafile or control file exceeds the REDUNDANCY setting, then RMAN considers the extra backups as obsolete. The default retention policy is REDUNDANCY 1.
    RMAN> show RETENTION POLICY;
    using target database control file instead of recovery catalog
    RMAN configuration parameters for database with db_unique_name DDTEST are:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    RMAN> CONFIGURE RETENTION POLICY TO REDUNDANCY 3;
    old RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    new RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 3;
    new RMAN configuration parameters are successfully stored
    RMAN> show RETENTION POLICY;
    RMAN configuration parameters for database with db_unique_name DDTEST are:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 3;
    RMAN> CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    old RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO REDUNDANCY 3;
    new RMAN configuration parameters:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    new RMAN configuration parameters are successfully stored
    RMAN> show RETENTION POLICY;
    RMAN configuration parameters for database with db_unique_name DDTEST are:
    CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
    CONTROL_FILE_RECORD_KEEP_TIME:This parameter applies only to records in the control file that are circularly reusable (such as archive log records and various backup records) ref Doc:CONTROL_FILE_RECORD_KEEP_TIME
    1. Any condition is there to set the Retention Policy Recovery Window and Redundancy and control_file_record_keep_time?What is the relationship between these 3 parameters?
    2. Explain the scenario if i set the control_file_record_keep_time=4 Redundancy=3 and Recovery Window=7?
    3. If i set the Redundancy=3 and Recovery Window=7 means my backup place only have 3 copies of backup based on the redundancy then what is the purpose of Recovery Window=7 please give some example.
    4. If i change the values for Recovery Window=3 and Redundancy=7 what will happened, how many days backup will be available in my FRA location?Explain with one scenario?
    so i believe you can get the Answer from Your Question from Above details.
    HTH

  • 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

  • Difference between redundancy & recovery window, rman

    Hi All,
    i want to know the difference between following two commands i.e.
    1. configure retention policy to redundancy 1;
    2. configure retention policy to recovery window of 1 days;
    we are taking rman based FULL backup every night, so just want to keep one day old backup, would like to know which one of the above is more appropriate.
    Regards,

    Nayyares,
    You should read this section of the docs,
    http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmconc1.htm#i1008093
    Redundanc is nothing but the number of copies. So you decide that you want to keep all the time , 3 copies of the backup of your db, you are going to use this. This serves the purpose that you can use this backup for whatever period of time in the past. Any copies before than these mentioned copies, will be marked obsolete by oracle. So if the number is 2 and , for example, you took first backups with tags A, B. Now when you will take the next backup with TAG C , A will be marked as obsolete. The most recent number of copies are kept irrespective of the time.
    Recovery window is that for how long , you want to go back in the past and be assured that the backup you have is sufficient for the recovery of db. This puts no limitations on the number of copies as like the Redundancy setting. So depending on your SLA, you may use the window timings.
    Both the settings are mutually exclusive so you don't have the liberty to go for both of them. As per your requirement, recovery window should work.
    As Sybrand mentioned, this all what I wrote is already in the docs(link mentioned by me above) so take some time and read it. Also, I would like to point you to this presentation which should make use of RMAN more clear.
    http://blogs.oracle.com/alejandroVargas/gems/RmanHandsOn.pdf
    HTH
    Aman....

  • Rman Retention policy to recovery window

    Hi,
    I have few basic doubts in RMAN backup policy
    1 . Is that possible to set Retention policy to recovery window in minutes??
    2 . If i set Backup Retention Policy to recovery window to 3 days and i am performing RMAN differential incremental backup for 4 days. Will my backups become obsolete after 3 days even though they are needed for recovery or they won't become obsolete since they are needed for recovery ???
    Regards,
    007

    1) Syntax is .... TO RECOVERY WINDOW OF integer DAYS ... no other time statement.
    2) Backups become obsolete when no longer needed to fulfil a retention policy. In a (theoretical) scenario, you perform a level 0 backup and then only incremental backups, the starting level 0 backup must be kept for ever (even if it WOULD be possible to define a recovery window in minutes).
    Werner

  • PIT recovery until time when database was in backup mode

    Hello,
    Is it possible to recover database until some point/time which is within "time window" when database tablespaces were still in online backup mode?
    I was basicaly replicatying database from source to target DB by putting DB to online backup mode, then copy all datafiles, after copy of datafiles was finished I started applying redologs generated on source DB afterwards. After I applied tens of redologs with "recover database until cancel using backup controlfile" and then typed "CANCEL" after 10-20 redologs applied I still got an error that opening DB would get an error due to inconsistent datafile. When I ended backup mode on source DB and applied few of redologs after ending backup mode on source DB datafiles were consistent.....
    Thx a lot for answer in advance.

    Hello Hemant K Chitale ,
    thats clear. I probably did not express it clearly, so I will describe it once again:
    Teoreticall scenario 1:
    I put 'source" database to backup mode and start copy datafiles to "target" db. When copy of all datafiles is succesfully finished (lets say it 5:00AM), I don't issue "end backup" on source DB but I keep tablespaces in backup mode until 7:00AM. On target DB I will start recovery and apply redologs from source system.
    Question 1:Is it possible to recover database until time 6:00AM? At this time all datafiles were already succesfully copied, BUT source db was still in backup mode. Or will I be able to get target DB to consistent state only after 7:00AM (end backup issuied on source DB) and not in window 5:00AM-7:00AM?
    Teoreticall scenario 2 (small correction comparing to scenario1):
    I will put source DB to begin backup mode at 5:00AM on 20.february and let it in this state until 7:00AM on 20.february. On target DB I will restore backup from source DB performed day before (or few days before does not matter) that means on 19.february and start to apply redologs generated after this backup.
    Question 2: Will I be able to recover DB until 6:00AM on 20.february and open database after recovery until this time? Or wont I be able to recover and open DB witin window 20.february 5:00AM-7:00AM (source db in backup mode)
    Bear in mind this is just teoreticly (don't ask me why would you do it and why you don't do it this way etc...). I just want to understand how it really works ;)
    Thx a lot!

  • Set until time WITH RMAN

    Hi
    I have tested the codes too but it doesn't seem to be able to recover the database (including the tablespace which I have dropped). Why?
    # RMAN backup
    run
    allocate channel ch1 type disk;
    sql 'alter system archive log current';
    backup format '/backup/orcl/%d_t%t_s%s_p%p'
    filesperset=4
    database;
    release channel ch1;
    RMAN > list backup;
    File LV Type Ckp SCN Ckp Time Name
    1 Full 4072944 06-JUL-05 /oracle/oradata/system01.dbf
    8 Full 4072944 06-JUL-05 /oracle/oradata/tools01.dbf
    12 Full 4072944 06-JUL-05 /oracle/oradata/test01.dbf
    # Drop tablespace
    drop tablespace test including contents;
    # RMAN Recovery
    shutdown immediate;
    startup mount;
    # time is set to after rman backup and before tablespace dropped
    RMAN>
    run {
    set until time "to_date('06-07-2005 16:50:00','dd-mm-yyyy hh24:mi:ss')";
    restore database;
    recover database;
    RMAN > list backup;
    File LV Type Ckp SCN Ckp Time Name
    1 Full 4072944 06-JUL-05 /oracle/oradata/system01.dbf
    8 Full 4072944 06-JUL-05 /oracle/oradata/tools01.dbf
    12 Full 4072944 06-JUL-05
    Why is the RMAN list empty for the deleted tablespace? That's the reason why there is nothing to reover from?

    check at sql prompt
    select substr(name,1,50),status
      2    from v$datafileYours test01.dbf file should have status recover and filename should be missing.
    Khurram

Maybe you are looking for