RECOVERY UNTIL TIME

Hi everyone,
Due to a mistake, we would like to recover our database to the day 10/06/2011 at 2am
The database version is 11.2, in archivelog mode.
We have a full backup once a week, last valid one is on 05/06/2011.
I made this script for rman and i want to be sure i didn't forget something to ckeck before used it :
RUN {
shutdown immediate;
startup mount;
sql "alter session set nls_date_format=''dd-mm-yyyy hh24:mi:ss''";
set until time '10-06-2011 02:00:00';
RESTORE DATABASE;
RECOVER DATABASE;
Can u tell me if it seems fine, did i have to reset the logs after that ?
Thanks for your help.
Br,
Alex

Thks but did u think my script seems to be clear ?run
sql 'alter session set NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"';
set until time = '10-06-2011 02:00:00';
restore database;
recover database;
sql 'alter database open resetlogs';
}

Similar Messages

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

  • Recovery until time, I don't understand where is my error....

    Hi All,
    sorry but I don't understand....
    I need to restore one full backup for recover until time at 18-nov of all database on a second server
    I'v a new server with the same oracle version and the same directory structure of the primary server. Oracle is 11.2.0.2.
    I've daily full backup, and in a zffsa storage I've all copy of last 3 day of backup; The second server access to the samce zfssa storage.
    With list backup I can see backup about 18 november and I can see backup about 19 november.
    How I can select backup about 18 november and restore only this?
    I've the same AMS structure, too.
    Can i restore all db and recover until time?
    Edited by: ggiulian on 19-nov-2012 16.03

    For example,
    in the second server, i start in nomount a duplicate instance, restore controlfile from backup, and startup mount.
    After, i connect to rman target / auxiliary /
    and run:
    run {
    allocate channel C1 device type disk;
    allocate auxiliary channel C2 device type disk;
    set until time "to_date('18-nov-2012 13:00:00','dd-mon-rrrr hh24:mi:ss')";
    restore database;
    recover database;
    I receive
    RMAN-03002: failure of restore command at 11/20/2012 01:44:21
    RMAN-06026: some targets not found - aborting restore
    RMAN-06023: no backup or copy of datafile 16 found to restore
    RMAN-06023: no backup or copy of datafile 15 found to restore
    RMAN-06023: no backup or copy of datafile 14 found to restore
    RMAN-06023: no backup or copy of datafile 13 found to restore
    RMAN-06023: no backup or copy of datafile 12 found to restore
    RMAN-06023: no backup or copy of datafile 11 found to restore
    RMAN-06023: no backup or copy of datafile 10 found to restore
    RMAN-06023: no backup or copy of datafile 9 found to restore
    RMAN-06023: no backup or copy of datafile 8 found to restore
    RMAN-06023: no backup or copy of datafile 7 found to restore
    RMAN-06023: no backup or copy of datafile 6 found to restore

  • 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

  • Problem ,working with UNTIL TIME..

    hi
    i have a serious problem when issuing UNTIL TIME commends.
    Such as this command in RMAN:
    run {
    backup
    (archivelog from time '02-OCT-06 09.00.00'
    until time '03-OCT-06 21.00.00');
    or working with UNTIL TIME in point-in-time recovery .
    it gives me this error:
    ORA-01830: date format picture ends before converting entire input string
    i have had this problem for a long time and i haven't found a solution for it.
    i will be grateful if anyone can help me beat this problem

    Try this:
    run {
    set until "to_date('01-10-2006','dd-mm-yyyy')";
    Best Regards
    Krystian Zieja / mob

  • 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

  • How to determine Until Time in restore

    Hi I have read
    Restoring and Recovering with Recovery Manager on line:
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96566/rcmrecov.htm
    I am not sure how to determine an Until Time during a restore, or in duplicating a database.
    Can someone show a specific example?
    The best thing I have found so far is this:
    SQL> select max(next_change#)
    from v$archived_log
    where archived='YES'
    group by thread#;
    OR
    SQL> select max(next_change#) from v$log_history;
    as documented here:
    RMAN-8060 Doing Duplicate Database on Recovered Database
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=189394.1
    But that still leads to:
    RMAN-06025: no backup of log thread 2 seq 2817 scn 3193354318 found to restore
    RMAN-06025: no backup of log thread 2 seq 2816 scn 3192569562 found to restore
    RMAN-06025: no backup of log thread 2 seq 2815 scn 3191725873 found to restore
    RMAN-06025: no backup of log thread 1 seq 2437 scn 3191725871 found to restore
    errors about half the time during duplication.
    Thanks!
    -John

    Hi All,
    We use the following query against the RMAN recovery catalog in our RMAN DUPLICATE scripting to identify the latest time that we can use.
    SELECT TO_CHAR(MAX(recover_time),'DD-MON-RR HH24:MI:SS')
    FROM
    (SELECT b.completion_time recover_time
    FROM dbinc a, rc_backup_piece b
    WHERE a.db_key = b.db_key
    AND a.db_name = '${SSID}'
    AND b.backup_type in ('D','I')
    AND b.status = 'A'
    AND b.device_type = 'SBT_TAPE'
    AND b.tag IS NOT NULL
    AND b.tag != 'CTRLBKUP'
    AND b.tag NOT LIKE 'TAG%'
    UNION
    SELECT next_time recover_time
    FROM rc_backup_redolog
    WHERE db_name = '${SSID}');
    Additionally, you may need to account for a rare problem with the absolute_fuzzy_change# is higher than the checkpoint change number. Oracle Development said this should be fixed at some point in the future when I last talked with them on the topic in 02/2004.
    We've coded around it (we're using Oracle EE 9.2.0.5+) by adding a couple of minutes between the incr backup and the archivelog)
    Hope this helps,
    Rich

  • Recover database until time - doesn't recover as expected

    Hi,
    We've got an Oracle 9i db (9208) running on AIX.
    We've had a problem and that has meant restoring all the dbf's and control files from the over night backup onto the server replacing the currently corrupted system.
    Once this was done we then opened the DB in order to check some things.
    Once this was done we then closed and mounted it and issued the "recover database until time .... " command.
    The archive logs we need are in the default archive location. They cover the time period just prior to the restored files up until the time we need the DB recovered to.
    However, when running the recover the alert log just shows
    "ALTER DATABASE RECOVER database until time '2010-08-11:16:30:00'
    Mon Aug 16 14:33:57 2010
    Media Recovery Start
    Media Recovery Not Required"
    Can anyone tell us why the recover command isn't recovering the archive log files up until the time we are specifying. It doesn't look like its even looking at them.
    The command executes in less than a second.
    Is this because we opened the DB between restoring and recovering so its already written a newer archive log file, so the DB thinks its already up to date???

    Got it - thanks
    Basically cause we were also restoring the control file so when adding the "using backup controlfile" it then started to work.
    SQL> recover database until time '2010-08-11:16:30:00' using backup controlfile
    ORA-00279: change 276395529 generated at 08/10/2010 21:59:38 needed for thread
    1
    ORA-00289: suggestion : /archive_logs/tprod/arch0000070260.arc
    ORA-00280: change 276395529 for thread 1 is in sequence #70260
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    This was the first message we got once we put the "using backup controlfile" part into the command.
    We selected AUTO and its now slowly working through all the archive log files going up the numbers therefore i assume applying the archive logs correctly.
    Once this is done i believe we just "alter database open resetlogs"

  • Set until time clause to restore controlfile

    Hello
    How can I use "set until" clause to restore the controlfile ?
    The database is already in archivelog mode.
    RMAN>
    run {
    set until time "TO_DATE('2011-02-24 09:30:00','yyyy-mm-dd hh24:mi:ss')";
    restore controlfile from autobackup;
    RMAN>
    RMAN> 2> 3> 4>
    executing command: set until time
    using target database control file instead of recovery catalog
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of set command at 02/24/2011 09:52:54
    ORA-01507: database not mountedThis is the rman backup log:
    Starting Control File and SPFILE Autobackup at 24-FEB-11
    piece handle=/oracle/ora1020/dbs/c-1270860316-20110224-01 comment=NONE
    Finished Control File and SPFILE Autobackup at 24-FEB-11I can also confirm that it was backed up.
    ls -l /oracle/ora1020/dbs/c-1270860316-20110224-01
    -rw-r-----  1 oracle dba 7143424 Feb 24 09:25 /oracle/ora1020/dbs/c-1270860316-20110224-01

    For Datafiles and ArchiveLogs :
    SET UNTIL works because RMAN can query the Controlfile (that is already present) {OR the Catalog, if available} to determine the Database Incaranation and identify all the BackupSets, BackupPieces and SCNs for datafiles.
    For Controlfiles :
    SET UNTIL needs to be able to query a source or determine a default location. If a Catalog is available, it can query the catalog. In the absence of the catalog, it can only determine the expected location to restore from on the basis of the AUTOBACKUP location and FORMAT.
    When you have AutoBackup to Disk, using an FRA and have the AUTOBACKUP FORMAT set correctly you will notice that the controlfile backups go to a directory that has the date as part of the directory name. RMAN can "query" the backups it finds in each of the folders in the autobackup location and determine the correct piece to restore from. This is predicated on the FORMAT being the expected format. That is why the example also shows how you set the FORMAT before you do the restore -- to "tell" RMAN what format to expect. (Remember that it has no repository -- controlfile or catalog -- to query so it doesn't know the backup piece names, unless they follow the expected location and format !)
    All of this works well on disk. On tape, it has to actually send it's requests to the Medial Management Layer -- it is the Media Management Layer that maintains the catalog of tapes and files on tapes. (Remember that RMAN still doesn't have a repository that it can query !).
    Going back to my earlier comment that SET UNTIL is used for Datafiles and Archivelogs : Because it is much easier for RMAN to query a known repository for all the information it needs.
    Hemant K Chitale

  • Using set until time for duplicate is extremely slow

    Whenever I do a duplicate using the set until time it takes forever to get started. The executing command: SET until clause takes about 20 minutes, and then when allocating channels it takes about 10 minutes per channel. Both db's are 10.2.0.3, and in archivelog mode. When I do just a plain duplicate database it runs through just fine, no pauses or anything. Can someone please poing me in the right direction or shed some light on this issue for me?
    Thanks!

    Hi,
    Here is what happens when I kick off the duplicate command with the run block:
    RMAN> run {
    2> set until time "to_date('Mar 14 2009 06:00:00','Mon DD YYYY HH24:MI:SS')";
    3> duplicate target database to DEST;
    4> }
    executing command: SET until clause
    using target database control file instead of recovery catalog
    Starting Duplicate Db at 17-MAR-09
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: sid=3985 devtype=DISK
    allocated channel: ORA_AUX_DISK_2
    channel ORA_AUX_DISK_2: sid=3984 devtype=DISK
    allocated channel: ORA_AUX_DISK_3
    channel ORA_AUX_DISK_3: sid=3983 devtype=DISK
    allocated channel: ORA_AUX_DISK_4
    channel ORA_AUX_DISK_4: sid=3982 devtype=DISK
    allocated channel: ORA_AUX_DISK_5
    channel ORA_AUX_DISK_5: sid=3981 devtype=DISK
    It takes anywhere from 15 to 20 minutes to allocate each channel, then it proceeds with the restoring of datafiles from the last backup. After that is done then it switches all the files, then it does this to start the recovery of the archive logs:
    contents of Memory Script:
    set until time "to_date('Mar 14 2009 06:00:00','Mon DD YYYY HH24:MI:SS')";
    recover
    clone database
    delete archivelog
    executing Memory Script
    executing command: SET until clause
    Starting recover at 17-MAR-09
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: sid=3981 devtype=DISK
    allocated channel: ORA_AUX_DISK_2
    channel ORA_AUX_DISK_2: sid=3982 devtype=DISK
    allocated channel: ORA_AUX_DISK_3
    channel ORA_AUX_DISK_3: sid=3983 devtype=DISK
    allocated channel: ORA_AUX_DISK_4
    channel ORA_AUX_DISK_4: sid=3984 devtype=DISK
    allocated channel: ORA_AUX_DISK_5
    channel ORA_AUX_DISK_5: sid=3977 devtype=DISK
    again it takes about 15 to 20 minutes to allocate each channel.

  • 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

  • UNTIL TIME problem

    Hi, I'm starting to use Rman environment for the implementation of our Database backup strategy. But I have one problem of missundestanding concepts. Can somebody explain me how does work the UNTIL TIME option please?.
    My problem is with the following rman script:
    RUN {
    RECOVER COPY OF DATABASE WITH TAG 'incr_update' UNTIL TIME 'SYSDATE - 7';
    BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'incr_update' DATABASE PLUS ARCHIVELOG;
    In detail, the Rman documentation say that it will implement "Incrementally Updated Backup" with a recovery windows of one week (7 days). But when I execute this example I always get a problem because "SYSDATE - 7" is before the current SCN date. This example is planned to be exectued daily and the update of backup is supposed to occurs the first day of the next week (I mean 8 days after).
    So, Is there a error with that part?, does that part must to be corrected with something like SYSDATE + 7?, but if I run this script daily, with SYSDATE + 7, the script never will gets this date, right?.
    Please any help and advices regarding this lack of knowledge from me, will be apreciated.
    Thanks in advance.
    HayrolR
    Edited by: HayrolR on Aug 24, 2009 3:07 PM

    Use the following until 7th day after the RESETLOGS date and then use your original script.
    RUN {
    RECOVER COPY OF DATABASE WITH TAG 'incr_update' UNTIL TIME 'SYSDATE';
    BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'incr_update' DATABASE PLUS ARCHIVELOG;
    }or simply do conventional incremental backups to maintain your retention period and the 7th day after the RESETLOGS date, start using your original script.

  • Recover Datafile until time

    Hi ALL,
    what is the correct syntax ....i get 'illegl recovery option until'
    when i use
    RECOVER DATAFILE 'COMPLETE FILENAME WITH PATH' UNTIL TIME '2006-01-28:16:00:00' ;
    wHAT IS THE CORRECT ONE ?
    Regards
    Sunny

    Recovery command in 9i

  • Determine set until time from particular backup set

    Hi Gurus,
    First of all thank you for everybody reading my question.
    I am using database control file instead of recovery catalog.
    database 10gr2
    10.2.0.3
    os is suse linux
    Is there way (any magic query)
    you can determine sec part correctly for set until time looking backup set:
    7544 B F A DISK 28-AUG-11 1 1 YES PROD_FULL_BKUP_08.28.2011
    ALLOCATE AUXILIARY CHANNEL aux1 DEVICE TYPE DISK;
    ALLOCATE AUXILIARY CHANNEL aux2 DEVICE TYPE DISK;
    ALLOCATE AUXILIARY CHANNEL aux3 DEVICE TYPE DISK;
    #SET UNTIL SEQUENCE 10008 thread 1;
    SET UNTIL TIME "TO_DATE('28-Aug-2011 03:40:32', 'dd-mon-YYYY hh24:mi:ss')";
    DUPLICATE TARGET DATABASE TO "11demo"
    I try hit and try for determining sec part.
    is there a proven way.
    '28-Aug-2011 03:40:31' worked
    '28-Aug-2011 03:40:38' didn't
    '28-Aug-2011 03:40:35' didn't.
    1)
    I look os time stamp set for backup.
    -rw-r----- 1 oracle oinstall 9281626112 2011-08-28 03:40 o1_mf_nnndf_PROD_FULL_BKUP_08_75mxdb7v_.bkp
    2) I add start time(03:00:00) +elapsed time.
    channel ORA_DISK_1: backup set complete, elapsed time: 00:40:35
    thanks

    I can get
    " list backup of archivelog all"
    BS Key Size Device Type Elapsed Time Completion Time
    7576 1.51G DISK 00:05:04 02-SEP-11
    BP Key: 7576 Status: AVAILABLE Compressed: YES Tag: ROD_ARC_09.02.2011
    Piece Name: /u02/flash_recovery_area/ROD/backupset/2011_09_02/o1_mf_ annnn_ADVPROD_ARC_09.02.20_7616s3fm_.bkp
    List of Archived Logs in backup set 7576
    Thrd Seq Low SCN Low Time Next SCN Next Time
    1 205824 3898563613 01-SEP-11 3898573074 01-SEP-11
    you can get "SET UNTIL SEQUENCE thread "
    correctly,
    But How does one find out the exact time the backup was completed?
    I simply used the timestamp from the Rman backup as an approximate indicator.
    Oracle Error:
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: system01.dbf'
    released channel: aux1
    released channel: aux2
    released channel: aux3
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 09/01/2011 12:53:48
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06053: unable to perform media recovery because of missing log
    RMAN-06025: no backup of log thread 1 seq 13891 lowscn 4013222506 found to restore
    Edited by: 880674 on Sep 2, 2011 7:07 AM

  • RECOVER UNTIL TIME

    Hi all,
    I try to flashback my database and when i do the command FLASHBACK DATABASE TO SCN 122343434; i receive the message saying that i don´t have any flashback logs. I don´t know why these logs disappear. What i whant now is recover database until time because i have all my archives. How can i do this??
    RECOVER DATABASE UNTIL SCN my_scnnumber;
    ALTER DATABASE OPEN RESETLOGS;
    Is just that??
    Tks,
    Paulo.

    Do you have FLASHBACK enabled?
    sys@ORCL> select flashback_on from v$database;
    FLASHBACK_ON
    YES
    Elapsed: 00:00:00.03
    sys@ORCL>You can do incomplete recovery with user managed backups.
    http://download-east.oracle.com/docs/cd/B19306_01/backup.102/b14191/osrecov008.htm#sthref1743

Maybe you are looking for