Cancel based recovery

dear dba's,
i'm using oracle 11gR2 in windows 2003 sever S2.
could anyone tell me
1. what is CANCEL BASED RECOVERY
2. pls give the commands with an explanation
3. In which suituation we must use this type of recovery.
Thanks & Regards,
John Marshal.A

+1. what is CANCEL BASED RECOVERY+
It is an incomplete recovery option , at particular time you want to recover yours database for an audit purpose or to avoid any logical error by users in past , but flashback technology now been dominant to cancel based reocovery.
+2. pls give the commands with an explanation+
+3. In which suituation we must use this type of recovery.+
When yours controlfile does not know when so far yours recover could be go on and on by "recover database using backup controlfile until cancel" yours restored controlfile from backup typically does not know how far i need redo if you are doing manual recovery while RMAN does not need cancel based recovery it will keep applying log until it finds and bumped out with an error RMAN-06054: media recovery requesting unknown archived log for ..... .
Situation could be manual recovery in general when you do not define time.scn based recovery using until clause.
Copied from my blog but need to be a bit changes thats why pasting here.
Scenario 1
I lost all data file but my control file is intact at the same location where it was , before lost datafiles i have backed up the data files, controlfile and archive logs.
If you are just restoring the data files and not control files then you may know how much archive log sequence required for yours recovery after the backup taken using archived log repository.
RMAN> backup database;
Starting backup at 02-OCT-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=128 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/his/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/his/sysaux01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/his/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/his/users01.dbf
channel ORA_DISK_1: starting piece 1 at 02-OCT-09
channel ORA_DISK_1: finished piece 1 at 02-OCT-09
piece handle=/u01/app/oracle/flash_recovery_area/HIS/backupset/2009_10_02/o1_mf_nnndf_TAG20091002T112226_5dc712wg_.bkp tag=TAG20091002T112226 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:45
Finished backup at 02-OCT-09
Starting Control File and SPFILE Autobackup at 02-OCT-09
piece handle=/u01/app/oracle/flash_recovery_area/HIS/autobackup/2009_10_02/o1_mf_s_699189791_5dc72j13_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 02-OCT-09
RMAN> sql 'alter system archive log current';
using target database control file instead of recovery catalog
sql statement: alter system archive log current
RMAN> sql 'alter system archive log current';
sql statement: alter system archive log current
RMAN> sql 'alter system archive log current';
sql statement: alter system archive log current
RMAN> exit
Recovery Manager complete.
[oracle@khurram his]$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.6.0 - Production on Fri Oct 2 11:24:04 2009
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select name,sequence#
  2    from v$archived_log
  3   where status='A'
  4  /
NAME                                                                                 SEQUENCE#
/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_2_699187272.dbf                           2
/u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_2_5dc73qw2_.arc   2
/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_3_699187272.dbf                           3
/u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_3_5dc73vgm_.arc   3
/u01/app/oracle/product/11.1.0/db_1/dbs/arch1_4_699187272.dbf                           4
/u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_4_5dc740d7_.arc   4
6 rows selected.You may know if yours control file intact (not lost or restored from backup), you may know how much recovery will go so far by knowing archived logs repository (conrolfile).From above v$archived_log archveilog repository you are seeing that after backup there are sequence required for the archive logs are 2,3 and 4 for recovering the restored backup which you have taken as above.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@khurram his]$ cd /u01/app/oracle/oradata/his/*.dbf
bash: cd: /u01/app/oracle/oradata/his/sysaux01.dbf: Not a directory
[oracle@khurram his]$ rm -rf  /u01/app/oracle/oradata/his/*.dbf
[oracle@khurram his]$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.6.0 - Production on Fri Oct 2 11:28:01 2009
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> shutdown abort
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.
Total System Global Area 1620115456 bytes
Fixed Size                  2144864 bytes
Variable Size             922748320 bytes
Database Buffers          687865856 bytes
Redo Buffers                7356416 bytes
Database mounted.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@khurram his]$ rman target /
Recovery Manager: Release 11.1.0.6.0 - Production on Fri Oct 2 11:29:30 2009
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
connected to target database: HIS (DBID=3219691467, not open)
RMAN> restore database;
Starting restore at 02-OCT-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=154 device type=DISK
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/his/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/his/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/his/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/his/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/HIS/backupset/2009_10_02/o1_mf_nnndf_TAG20091002T112226_5dc712wg_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/flash_recovery_area/HIS/backupset/2009_10_02/o1_mf_nnndf_TAG20091002T112226_5dc712wg_.bkp tag=TAG20091002T112226
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:35
Finished restore at 02-OCT-09
RMAN> recover database;
Starting recover at 02-OCT-09
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 2 is already on disk as file /u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_2_5dc73qw2_.arc
archived log for thread 1 with sequence 3 is already on disk as file /u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_3_5dc73vgm_.arc
archived log for thread 1 with sequence 4 is already on disk as file /u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_4_5dc740d7_.arc
archived log file name=/u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_2_5dc73qw2_.arc thread=1 sequence=2
media recovery complete, elapsed time: 00:00:01
Finished recover at 02-OCT-09
as you can see that 2,3,4 were required during recovery process.Scenario 2
I lost all data file as well control file , i have backed up the data files, controlfile and archive logs.
Its like a disastre you lost alls data file and as well controlfile , if you backed the controlfile then remember during controlfile backup it will have file type flag 4 that tells Oracle it is a backup control file. The Stop SCN for alls data file marked to 0xffff.ffffffff (infinity).File type flag in the backup control file tells to oracle that it cannot rely on its redo thread,which means recovering will go on and on , controlfile will not aware how much should i go for redo it will never stop if you are able to supply redo.
It will always ask you more subsequent redo if you already supplied to it during process that's why it let you open the database in reset logs.
Lets see after restoring the controlfile and datafiles , you will see SQL tool recovery mechanism ask you recover database using backup controlfile which shows that controlfile does not know where to end the applying redo chain.
Here an excerpt which shows that restored controlfile does not know till how long the redo should be applied, its the RMAN robustness which does not ask you manually to supply redo, RMAN search the alls redo from archivelogs and if possible you have redo within redo logs.But if you are not with RMAN i.e recovering by SQL then you have to cancel recovery at some end.
RMAN> shutdown abort
Oracle instance shut down
RMAN> exit
Recovery Manager complete.
[oracle@khurram ~]$ rm -rf /u01/app/oracle/oradata/his/*
[oracle@khurram ~]$ rman target /
Recovery Manager: Release 11.1.0.6.0 - Production on Fri Oct 2 09:32:37 2009
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
connected to target database (not started)
RMAN> startup nomount
Oracle instance started
Total System Global Area    1620115456 bytes
Fixed Size                     2144864 bytes
Variable Size                922748320 bytes
Database Buffers             687865856 bytes
Redo Buffers                   7356416 bytes
RMAN> restore controlfile from autobackup;
Starting restore at 02-OCT-09
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=153 device type=DISK
recovery area destination: /u01/app/oracle/flash_recovery_area
database name (or database unique name) used for search: HIS
channel ORA_DISK_1: AUTOBACKUP /u01/app/oracle/flash_recovery_area/HIS/autobackup/2009_10_02/o1_mf_s_699182899_5dc0c49t_.bkp found in the recovery area
AUTOBACKUP search with format "%F" not attempted because DBID was not set
channel ORA_DISK_1: restoring control file from AUTOBACKUP /u01/app/oracle/flash_recovery_area/HIS/autobackup/2009_10_02/o1_mf_s_699182899_5dc0c49t_.bkp
channel ORA_DISK_1: control file restore from AUTOBACKUP complete
output file name=/u01/app/oracle/oradata/his/control01.ctl
output file name=/u01/app/oracle/oradata/his/control02.ctl
output file name=/u01/app/oracle/oradata/his/control03.ctl
Finished restore at 02-OCT-09
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> restore database;
Starting restore at 02-OCT-09
Starting implicit crosscheck backup at 02-OCT-09
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=153 device type=DISK
Crosschecked 1 objects
Finished implicit crosscheck backup at 02-OCT-09
Starting implicit crosscheck copy at 02-OCT-09
using channel ORA_DISK_1
Finished implicit crosscheck copy at 02-OCT-09
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: /u01/app/oracle/flash_recovery_area/HIS/autobackup/2009_10_02/o1_mf_s_699182899_5dc0c49t_.bkp
File Name: /u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_5_5dc0d1m8_.arc
File Name: /u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_3_5dc0cx6p_.arc
File Name: /u01/app/oracle/flash_recovery_area/HIS/archivelog/2009_10_02/o1_mf_1_4_5dc0czx3_.arc
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/his/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/his/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/his/undotbs01.dbf
channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/his/users01.dbf
channel ORA_DISK_1: reading from backup piece /u01/app/oracle/flash_recovery_area/HIS/backupset/2009_10_02/o1_mf_nnndf_TAG20091002T092724_5dc09dlc_.bkp
channel ORA_DISK_1: piece handle=/u01/app/oracle/flash_recovery_area/HIS/backupset/2009_10_02/o1_mf_nnndf_TAG20091002T092724_5dc09dlc_.bkp tag=TAG20091002T092724
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:45
Finished restore at 02-OCT-09
[oracle@khurram ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.1.0.6.0 - Production on Fri Oct 2 09:34:51 2009
Copyright (c) 1982, 2007, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> recover database using backup contorlfile until cancel
Keep applying log as you can and you have and cancel at an end when alls logs are supplied to recovery process.

Similar Messages

  • Time & cancelled based recovery

    Hi DBAs,
    Any one can give me clear idea about, what is time based recovery and until cancel based recovery.
    Thanks a lot

    Any one can give me clear idea about, what is time based recovery and until cancel based recovery.All are incomplete recovery scenarios.
    refer these links
    *Performing Incomplete Recovery [ID 114199.1]*
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1406803852098
    http://docs.oracle.com/cd/B10500_01/server.920/a96572/performingreco.htm

  • 실수로 TABLE을 DELETE 또는 DROP한 경우 복구 방법 (time-based recovery)

    제품 : ORACLE SERVER
    작성날짜 : 2004-07-29
    PURPOSE
    사용자의 실수로 중요한 데이타를 delete 하였거나, 테이블을 drop하였을
    경우 복구하는 절차를 정리한 자료이다.
    Explanation
    사용 중인 database 의 archive log mode 여부를 다음과 같이 확인 후
    archive log mode인지 아닌지에 따라 복구 방법이 달라진다.
    os>svrmgrl
    SVRMGR> connect internal;
    SVRMGR> archive log list
    Database log mode ARCHIVELOG
    Automatic archival ENABLED
    Archive destination ?/dbs/arch
    Oldest online log sequence 2525
    Current log sequence 2527
    1. Archive mode인 경우 복구 방법
    archive log mode로 운영중이면서 full backup및 archive file들이 모두
    존재하는 경우 복구가 항상 가능하다.
    이때 다시 다음과 같이 두가지의 경우를 구분하여 복구 작업을 수행할 필요가
    있으며 아래에 각각의 경우에 대한 절차를 자세히 설명한다.
    (1) drop이나 delete한 시점이 얼마 지나지 않았거나, 혹은 필요에 의해
    database 전체를 data 손실 이전 시점으로 돌리고자 하는 경우
    (2) 손실된 data만을 drop이나 delete이전 상태를 받아내고, 나머지 data는
    모두 drop/delete이후 발생한 transaction의 반영분을 유지시키기 위해
    현재 시점으로 맞추어햐 하는 경우
    1-1 database 전체를 drop이나 delete 이전시점으로 돌리고자 할 때
    이러한 경우는 데이타 손실이 발생하기 이전의 datafile들에 대한 backup을
    restore한 후 손실 발생 시점 직전까지 time based로 imcomplete recovery를
    수행하면 된다.
    (1) db를 shutdown시킨 후 현재 상태를 만약의 경우를 대비하여 cold
    backup을 받아둔다.
    shutdown immediate로 db를 내리고, datafiles, redo log files, control
    files 모두 tar등의 명령어를 이용하여 backup을 받아둔다.
    이것은 만약의 경우 이전 backup이나 archive file에 문제가 있는 경우,
    삭제된 data의 복구가 불가능할 경우 현재 상태로라도 돌리기 위한
    것이다.
    (2) 데이타를 삭제하기 이전 상태에서 받아둔 datafile full backup을
    restore한다.
    redo log files과 controlfiles은 현재 것을 그대로 이용하고, 현재
    상태의 모든 datafiles을 지우고 데이타가 삭제되기 전에 받아둔
    backup datafile을 restore시킨다.
    (temp datafile의 경우는 restore시간을 줄이기 위해 restore하지
    않아도된다.)
    (3) restore한 backup시점 이후의 archive file들을 archive log
    destination에 위치시킨다.
    full backup 이후의 archive file들을 일부 tape 장비등에 backup을
    받아두고 지운 상태라면 그러한 file을을 다시 원래 위치에 restore
    하여, full backup받은 시점부터 복구하고자 하는 시점까지의
    archive log file들이 모두 log archive destination에 존재하는지
    확인한다.
    (4) 데이타 삭제 이전 시점까지 time based로 recover를 수행한다.
    이때 날짜와 시간 지정은 항상 아래 예와 같은 형식으로 지정한다.
    만약 데이타를 삭제한 시간이후로 지정하게 되면 recovery후에도
    여전히 data는 지워진 상태로 보여진다.
    os>svrmgrl
    SVRMGR> connect internal
    SVRMGR> startup mount;
    SVRMGR> set autorecovery on
    SVRMGR> recover database until time '2001-01-30:21:00:00';
    SVRMGR> alter database open resetlogs;
    (a) 만약 이때, controlfile이 현재것이 존재하지 않아 datafile뿐
    아니라, controlfile도 과거것을 사용했다면, recovery command를
    다음과 같이 지정하면 된다.
    recover database using backup controlfile (아래줄과 이어짐)
    until time '2001-01-30:21:00:00';
    (b) temp datafile을 restore하지 않은 경우라면 startup mount수행
    직후 다음과 같은 문장을 추가하면 된다.
    alter databse datafile '/oracle/oradata/temp01.dbf'
    offline drop;
    /oracle/oradata/temp01.dbf는 temp datafile의 이름을 예로 든
    것이다.
    (5) 원하는 data가 제대로 조회되는지 확인한다.
    1-2. 삭제된 data만을 복구하고 나머지는 현재 상태를 유지하고자 하는 경우
    이러한 경우는 데이타가 삭제되기 이전 상태의 backup datafile 중에
    SYSTEM, RBS와 삭제된 data가 들어있는 datafile만을 restore시켜 time
    based로 recovery하여 db를 open시킨 후 원하는 table만 export를 받아낸다.
    그리고 다시 현재 상태의 db에 export받은 내용을 import시키는 것이다.
    이때 삭제된 data를 export받기까지의 절차에 대해서 다음과 같이 세가지
    경우의 방법을 생각할 수 있다.
    (a) 다른 시스템에 backup이나 test용으로 oracle이 설치되어 있는 경우
    그 시스템에 backup을 restore하여 해당 table을 export 받는 방법
    (b) 같은 시스템에 backup을 restore 하되, db name과 oracle_sid를 다른
    이름으로 변경하여 다른 db를 만들어 recovery후 open하여 export받는
    방법 <Bulletin:11616 참조>
    (c) 현재 db는 cold backup받아 두고, backup을 restore하여 export을
    받아내는 방법
    여기에서 (a)의 경우는 다른 시스템에 이용하고자 하는 datafile의 oracle
    version 이상의 oracle software가 이미 설치되어 있어야 한다.
    (b)의 경우는 현재 상태의 cold backup을 받았다가 export받은 후 다시
    현재 상태를 restore할 필요는 없애주지만, 대신 SYSTEM, RBS, user
    datafile 만큼의 disk space가 추가로 필요하며, 새로운 db를 추가로
    구성하는 것이므로 init.ora file 구성 등의 작업이 필요하다.
    이것에 관한 자세한 절차는 <Bulletin:11616>을 참조하도록 한다.
    이 자료에서는 이중 (c)에 대한 것만을 자세히 설명한다.
    (1) 현재의 모든 datafiles과 redo log files, datafiles을 다음과 같이
    신중히 cold backup을 받아두도록 한다.
    이것은 이후에 삭제한 data를 복구하여 export를 받은 후에 다시 현재
    상태의 db로 되돌아오기 위한 것이다.
    단 이 때 tar 등을 이용하여 cold backup하는 대신에 disk 상에 cold
    backup을 받아 시간을 절약할 수 있다. disk로의 backup이 가능한
    이유는 export를 위한 time based recovery를 수행하기 위해 필요한
    datafile이 SYSTEM, RBS, 삭제된 data를 포함한 user datafile
    정도이기 때문이다.
    os>svrmgrl
    SVRMGR> connect internal
    SVRMGR> shutdown immediate;
    SVRMGR> exit
    os>cp /oracle/oradata/*.ctl /oracle/backup/*.ctl
    os>cp /oracle/oradata/redo*.log /oracle/backup/redo*.log
    os>mv /oracle/oradata/system01.dbf /oracle/backup/system01.bak
    os>mv /oracle/oradata/rbs01.dbf     /oracle/backup/rbs01.bak
    os>mv /oracle/oradata/tools01.dbf /oracle/backup/tools01.bak
    redo log file이나 controlfile의 경우는 time based recovery시에도
    필요하므로 cp를 받아두고, datafile의 경우는 mv를 이용하도록 한다.
    위의 예에 제시된 file이름들은 해당 환경에 맞게 변경되어야 하며,
    tar를 이용하여 tape에 옮겨도 관계는 없으나, 단 cold backup에
    해당하는 모든 datafiles, redo log files, control files를 받아두어야
    한다.
    (2) 삭제한 data가 존재할 당시에 받아둔 backup에서 SYSTEM datafile, RBS
    datafile, 그리고 삭제한 table이 들어있는 datafile만을 restore한다.
    redo log files과 controlfiles은 현재 것을 그대로 이용한다.
    (3) restore한 backup시점 이후의 archive file들을 archive log
    destination에 위치시킨다.
    full backup 이후의 archive file들을 일부 tape 장비 등에 backup을
    받아두고 지운 상태라면 그러한 file을을 다시 원래 위치에 restore
    하여, full backup받은 시점부터 복구하고자 하는 시점까지의
    archive log file들이 모두 log archive destination에 존재하는지
    확인한다.
    (4) restore하지 않을 datafile, 즉 SYSTEM, RBS, 삭제된 data를 포함하
    는 user datafile을 제외한 모든 datafile은 모두 offline drop시키
    고, 데이타 삭제 이전 시점까지 time based로 recover를 수행한다.
    이때 날짜와 시간 지정은 항상 아래 예와 같은 형식으로 지정한다.
    만약 데이타를 삭제한 시간이후로 지정하게 되면 recovery후에도
    여전히 data는 지워진 상태로 보여진다.
    os>svrmgrl
    SVRMGR> connect internal
    SVRMGR> startup mount;
    SVRMGR> alter database datafile '/oracle/oradata/temp01.dbf'
    offline drop; (윗줄과 이어짐)
    SVRMGR> alter database datafile '/oracle/oradata/userdata05.dbf'
    offline drop; (윗줄과 이어짐)
    ... 이와 같이 resotre하지 않은 datafile을 모두 offline drop시킨다.
    SVRMGR> set autorecovery on
    SVRMGR> recover database until time '2001-01-30:21:00:00';
    SVRMGR> alter database open resetlogs;
    만약 이때, controlfile이 현재것이 존재하지 않아 datafile뿐 아니라,
    controlfile도 과거것을 사용했다면, recovery command를 다음과 같이
    지정하면 된다.
    SVRMGR>recover database using backup controlfile until time
    '2001-01-30:21:00:00'; (윗줄과 이어짐)
    (5) 원하는 data가 제대로 조회되는지 확인한 후 필요한 table을 export한다.
    예를 들어 scott user의 dept table을 복구하고자 한것이었다면 다음과
    같이 export를 받는다.
    os>exp scott/tiger file=dept.dmp tables=dept log=deptlog1
    (6) time based로 recovery후 open한 db는 shutdown하여 없애고 (1)번에서
    받아둔 현재 상태의 backup을 restore한다.
    shutdown은 immediate나 abort 모두 가능하며, shutdown후 restore한
    SYSTEM, RBS, user datafile모두 삭제하고, 사용하던 controlfiles,
    redo log files도 모두 삭제한다.
    그리고 (1)에서 mv나 cp로 (혹은 tar로) 옮겨놓은 모든 datafiles,
    controlfiles, redo log files를 원래의 directory와 이름으로
    위치시킨다. SYSTEM, RBS, user datafile도 반드시 (1)번 상태의
    현재 상태 backup을 restore하여야 한다.
    (7) db를 startup시킨 후 (5)에서 받은 export내용을 import시킨다.
    os>imp scott/tiger file=dept.dmp tables=dept ignore=y commit=y
    log=deptlog2 (윗줄과 이어짐)
    (8) 원하는 data가 제대로 조회되는지 확인한다.
    2. No archive mode 로 운영할 경우 복구 방법
    archive mode 로 운영하지 않았을 경우에는, 삭제한 data를 export 받아
    두었거나, 혹은 data가 삭제 전 받아둔 cold backup이 존재하는 경우
    복구가 가능하다.
    (1) export가 존재하는 경우
    다음과 같이 import한다. scott user의 dept가 삭제된 경우를 예로 들었다.
    os>imp scott/tiger file=dept.dmp tables=dept ignore=y commit=y log=log1
    (2) cold backup이 존재하는 경우
    다른 시스템에 사용가능한 oracle engine이 설치되어 있다면, 그곳을
    이용하거나, 혹은 현재 database를 backup받아둔후 현재 시스템에
    restore하여 export를 받아낼 수 있다.
    (1) 현재의 모든 datafiles과 redo log files, datafiles을 다음과 같이
    신중히 cold backup을 받아두도록 한다.
    이것은 이후에 삭제한 data를 복구하여 export를 받은 후에 다시 현재
    상태의 db로 되돌아오기 위한 것이다.
    단 이 때 tar 등을 이용하여 cold backup하는 대신에 disk 상에 cold
    backup을 받아 시간을 절약할 수 있다. disk로의 backup이 가능한
    이유는 export를 위한 time based recovery를 수행하기 위해 필요한
    datafile이 SYSTEM, RBS, 삭제된 data를 포함한 user datafile
    정도이기 때문이다.
    os>svrmgrl
    SVRMGR> connect internal
    SVRMGR> shutdown immediate;
    SVRMGR> exit
    os>mv /oracle/oradata/*.ctl /oracle/backup/*.ctl
    os>mv /oracle/oradata/redo*.log /oracle/backup/redo*.log
    os>mv /oracle/oradata/system01.dbf /oracle/backup/system01.bak
    os>mv /oracle/oradata/rbs01.dbf     /oracle/backup/rbs01.bak
    os>mv /oracle/oradata/tools01.dbf /oracle/backup/tools01.bak
    위의 예에 제시된 file이름들은 해당 환경에 맞게 변경되어야 하며,
    tar를 이용하여 tape에 옮겨도 관계는 없으나, 단 cold backup에
    해당하는 모든 datafiles, redo log files, control files를 받아두어야
    한다.
    (2) 삭제한 data가 존재할 당시에 받아둔 backup에서 SYSTEM datafile,
    RBS datafile, 그리고 삭제한 table이 들어있는 datafile만을
    restore한다.
    backup당시의 redo log files과 controlfiles도 restore하여야 한다.
    (3) restore하지 datafile, 즉 SYSTEM, RBS, 삭제된 data를 포함하는 user
    datafile을 제외한 모든 datafile은 모두 offline drop시키고,
    database를 open시킨다.
    os>svrmgrl
    SVRMGR> connect internal
    SVRMGR> startup mount;
    SVRMGR> alter database datafile '/oracle/oradata/temp01.dbf'
    offline drop; (윗줄과 이어짐)
    SVRMGR> alter database datafile '/oracle/oradata/userdata05.dbf'
    offline drop; (윗줄과 이어짐)
    ... 이와 같이 resotre하지 않은 datafile을 모두 offline drop시킨다.
    SVRMGR> alter database open;
    (4) 원하는 data가 제대로 조회되는지 확인한 후 필요한 table을 export
    한다.
    예를 들어 scott user의 dept table을 복구하고자 한 것이었다면
    다음과 같이 export를 받는다.
    os>exp scott/tiger file=dept.dmp tables=dept log=deptlog1
    (5) exprot받아낸 database는 shutdown하여 없애고 (1)번에서 받아둔
    현재 상태의 backup을 restore한다.
    shutdown은 immediate나 abort 모두 가능하며, shutdown후 restore한
    SYSTEM, RBS, user datafile모두 삭제하고, 사용하던 controlfiles,
    redo log files도 모두 삭제한다.
    그리고 (1)에서 mv나 tar로 옮겨놓은 모든 datafiles, controlfiles,
    redo log files를 원래의 directory와 이름으로 위치시킨다.
    (6) db를 startup시킨 후 (4)에서 받은 export내용을 import시킨다.
    os>imp scott/tiger file=dept.dmp tables=dept ignore=y commit=y
    log=deptlog2 (윗줄과 이어짐)
    (7) 원하는 data가 제대로 조회되는지 확인한다.

  • Cancel media recovery

    Hai all,
    In note id , 232240.1 - Performing Switchover in a Data Guard Configuration
    Convert the physical standby to the new primary:
    If you are on verion 9.0.1 then you should first cancel managed recovery prior
    to issuing the above command. If you are on 9.2.0 and have started managed
    recovery with the "through all switchover" clause then you should also cancel
    managed recovery before issuing the above command.
    also cancel
    managed recovery before issuing the above command.>>>>>>>>
    How can I cancel this ?
    Kai

    ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
    sbs

  • SQL*Plus auto accept CANCEL during recovery

    I am scripting out to do an incomplete recovery with a backup controlfile.
    How do I get SQL*Plus to automatically accept "CANCEL"
    when I get to this point: Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    and then move on to "alter database open resetlogs"
    SQL> recover database until cancel;
    ORA-00279: change 794271 generated at 12/22/2006 12:09:07 needed for thread 1
    ORA-00289: suggestion :
    /opt/oracle/flash_recovery_area/DDB/archivelog/1_4_609804799.dbf
    ORA-00280: change 794271 for thread 1 is in sequence #4
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    CANCEL
    Media recovery cancelled.
    SQL> ALTER DATABASE OPEN RESETLOGS;

    You can't - that's the whole point behind incomplete media recovery - how does sqlplus know when you want to cancel

  • SCN based recovery

    I need to verify SNC based recovery.
    For that i need to change SCN of the datafile.
    How i can change that?
    Please provide stpes if any.
    [I cannot rename any datafile]
    Thanks.

    Hi,
    Are you taking about Rolling a Standby Forward using an RMAN ? if yes then please review the article
    Rolling a Standby Forward using an RMAN Incremental Backup in 10g [ID 290814.1]
    Kind Regards,
    Rakesh Jayappa

  • Recover database from archive log: Time based recovery

    Hi,
    Could you pelase help regarding the following:
    I have power outage in my machine running oracle 9i on Solaris OS 9
    Oracle is mounted but failed to open
    Once it is started showing the error message
    SQL> startup;
    ORACLE instance started.
    Total System Global Area 9457089744 bytes
    Fixed Size 744656 bytes
    Variable Size 3154116608 bytes
    Database Buffers 6291456000 bytes
    Redo Buffers 10772480 bytes
    Database mounted.
    ORA-01113: file 4 needs media recovery
    ORA-01110: data file 4: '/opt/oracle/oradata/sysdb/indx/indx01.dbf'
    So I tried to recover the database
    SQL> recover database;
    ORA-00279: change 1652948240 generated at 12/03/2007 13:09:08 needed for thread
    1
    ORA-00289: suggestion : /opt/oracle/oradata/nobilldb/archive/1_183942.dbf
    ORA-00280: change 1652948240 for thread 1 is in sequence #183942
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    ORA-00279: change 1652948816 generated at 12/03/2007 13:09:19 needed for thread
    1
    ORA-00289: suggestion : /opt/oracle/oradata/nobilldb/archive/1_183943.dbf
    ORA-00280: change 1652948816 for thread 1 is in sequence #183943
    ORA-00278: log file '/opt/oracle/oradata/nobilldb/archive/1_183942.dbf' no
    longer needed for this recovery
    The power outage at 16:00pm and the recovery archive log file '/opt/oracle/oradata/nobilldb/archive/1_183942.dbf' at 11 am
    Always I am applying the next sequence it is giving the same message and asking the next sequence. I have more than 900 archive log from 11am to 4pm and each of them having the size of 100mb and it take 1 minute to get back from each to provide this error message.
    How I can start my recovery from say 15:45 onwards until 16:15?
    I have all archive logs in the proper destination.
    Still my database is not opened and it is starts applying archive log since 5 hours back, please help me regarding this
    Thanks in advance

    Wrong forum. Post your question in the following forum:
    General Database Discussions

  • Training cancellation - based on actions in IT0000

    Hi friends,
    When a staff leaves the organization(resignation-action) , the person tagged to any future course , after the resignation the org unit and controlling area tagged to the person(course run(BE)) in training module becoming null. How can we control this. Pls advise. Thanks.

    Hello Priya,
    Thanks for the reply. But my scenario is different.
    Eg:
    1. Staff supposed attending course on 03.03.2010.(Internally the staff tagged to org unit,cotrolling area)
    2. When staff resigns(after resignation action) on 22.02.2010, the org unit and controlling area becoming null in PSV1.
    Can we control this through any configuration in trg module,  even after resignation happens the person still tagged to the course with controlling area and org unit. pls advise.
    Thanks.

  • "The backup was canceled" Rescue & Recovery Failure

    Keep getting this issue with R&R. Trying to make an initial backup to an external USB drive. I do not want to make the drive bootable, so I hit no to that option. I am backing up to a partition on the drive. I can access the partition through "my computer". The partition has more than twice the free space as the capacity of the drive I am trying to back up. I do not understand why I get the error message.
    When asking for help, post your question in the forum. Remember to include your system type, model number and OS. Do not post your serial number.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help others with the same question in the future.
    My TPs: Twist 2HU: i5-3317U Win 8 Pro, 4GB RAM 250GB Samsung 840 | T420 4177CTO: i5-2520M, HD+, Win 7 Pro x64, 8GB RAM, Optimus, 160GB Intel 320 SSD, Intel 6300 WiFi, BT 3.0 | T400 2764CTO: P8700, WXGA, Win 7 Ult x64, AMD 3470, 8GB RAM, 64GB Samsung SSD, BT, Intel 5300 WiFi | A20m 14.1" PIII 500 (retired). Monitors: 2x Dell U2211h IPS 100% sRGB calibrated w/ Spyder3.

    I can't back up to the system HDD b/c there isn't enough space.
    R&R does show the external.
    I tired Windows backup and it threw an error of 0x80070002. I disabled Windows Media Player network sharing service and enabled the built-in admin account. Tried it with R&R -- no luck. Tried it with Windows Backup, it worked.
    When asking for help, post your question in the forum. Remember to include your system type, model number and OS. Do not post your serial number.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"! This will help others with the same question in the future.
    My TPs: Twist 2HU: i5-3317U Win 8 Pro, 4GB RAM 250GB Samsung 840 | T420 4177CTO: i5-2520M, HD+, Win 7 Pro x64, 8GB RAM, Optimus, 160GB Intel 320 SSD, Intel 6300 WiFi, BT 3.0 | T400 2764CTO: P8700, WXGA, Win 7 Ult x64, AMD 3470, 8GB RAM, 64GB Samsung SSD, BT, Intel 5300 WiFi | A20m 14.1" PIII 500 (retired). Monitors: 2x Dell U2211h IPS 100% sRGB calibrated w/ Spyder3.

  • Recovery issue in noarchive log

    Hi,
    i need recovery for a database which is running in noarchive log mode.The dbas im my org take cold backup so they donot put the db in archive log mode. Now the database needs recovery it gets mounted but doesnot open and the db server asks me to apply the archive logfile which i donot have.i have also set the allowresetlogs_corrution to true. after restoring and performing the cancel based recovery the oracle server asks me for archive logfiles.i cannot perform incomplete recovery since the logifiles have been overwritten for a very long extend.
    so at this stage how can i recover the database.
    please provide me the essential steps.
    I was provided this issue to solve.kindly help me.......
    Thanks and Reagards
    Ilamparithi.A.

    An inconsistent backup of a NOARCHIVELOG database is useless... Worse than useless, actually, if it provides a false sense of security that the database has been backed up and the data is somewhat safe.
    I'm afraid the answer is most likely that the database is gone forever. If this is particularly valuable data, Oracle Consulting does have a tool (as do the ORA-600 folks in DUDE) that can probably recover most of the data from the data files. But these are not cheap utilities-- unless this is particularly valuable data, it may be more cost effective to toss the backups, find what data you can from other sources (old backups, old exports, other databases, etc) and chalk the cost of reconstituting the rest of the data up to the cost of hiring DBAs that didn't know what they were doing.
    Doug Burns has a discussion on the [http://oracledoug.com/serendipity/index.php?/archives/789-DUDE,-Wheres-My-Data.html|DUDE data unloader]
    I'd strongly suggest opening a Metalink ticket just to cover your own butt here. I expect them to tell you the same thing, but it's obviously a lot easier to go to management to tell them they've lost their data or that they need to write a check with lots of 0's to get it back because Metalink said so rather than because some guy on the internet said so.
    Justin

  • RMAN-01009: syntax error: found "cancel"

    Hi!
    I am playing with rman on my test machine and I encountered error that I can't resolve.
    I've tried to restore/recover datafiles executing this commands:
    $ sqlplus "/as sysdba"
    SQL>startup mount
    RMAN> restore database
    (everything went well)
    RMAN> recover database until cancel;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "cancel": expecting one of: "logseq, scn, sequence, time"
    RMAN-01007: at line 1 column 24 file: standard input
    I've executed this command on several occasions and never had a problem, but now syntax error.
    Just don't know why syntax error?!
    OS: Centos 5
    DB: 11.1.0.7.0
    Thanks for any help,
    Marko

    RMAN> alter database recover database using backup controlfile until cancel;
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-00558: error encountered while parsing input commands
    RMAN-01009: syntax error: found "recover": expecting one of: "mount, open"
    RMAN-01007: at line 1 column 16 file: standard input
    RMAN> recover database;
    Starting recover at 05-FEB-09
    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 02/05/2009 00:11:30
    ORA-00283: recovery session canceled due to errors
    RMAN-11003: failure during parse/execution of SQL statement: alter database recover if needed
    start
    ORA-00283: recovery session canceled due to errors
    ORA-00313: open failed for members of log group 3 of thread 1
    ORA-00312: online log 3 thread 1: '/oradata/testdb/redo/testdb/onlinelog/o1_mf_3_4qfwj5fn_.log'
    ORA-27037: unable to obtain file status
    Linux Error: 2: No such file or directory
    Additional information: 3
    I am trying to execute:
    RMAN> sql 'alter database open resetlogs';
    sql statement: alter database open resetlogs
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03009: failure of sql command on default channel at 02/05/2009 00:09:18
    RMAN-11003: failure during parse/execution of SQL statement: alter database open resetlogs
    ORA-01139: RESETLOGS option only valid after an incomplete database recovery
    This is the reason why I am trying to execute cancel-based recovery.

  • Recovery scenarios

    Hi,
    I am doing testing on recovery. Can some one guide me to a link where I can find some good recovery scenarios.
    I have gone through the following one:
    http://docs.oracle.com/cd/B12037_01/server.101/b10735/recov.htm
    Appreciate ur help

    What I would do is setup a test recovery database.
    Then I would document "How the failure scenario was setup" and the recovery plan.
    I would start with something like this :
    RMAN Block Media Recovery
    RMAN Cancel Based Recovery
    RMAN Duplicate Database on new Host
    RMAN Log Sequence based recovery
    RMAN loss of all Control files No Catalog
    RMAN Loss of all Control Files
    RMAN loss of all database files including SPFILE
    RMAN Loss of data file and no Catalog
    RMAN Loss of file containing Online Undo Segment
    RMAN Loss of INACTIVE Online Redo Log Group
    RMAN Loss of Media
    RMAN Recovering Archived Logs Only
    RMAN Recovering Datafile for which no backup exist
    RMAN recovery from loss of all online redo log files
    RMAN Recovery of a Datafile to a different location
    RMAN Recovery of Databases with Read-Only Tablespaces
    RMAN Recovery of LOSS SYSTEM TABLESPACE
    RMAN Recovery of Read-Only Tablespace and Control file
    RMAN Tablespace Point in Time Recovery
    RMAN Time Based Recovery
    You can google on some of these to get idea's for scenario's.
    I would do a cold backup in case the RMAN test fails.
    Make sure you have a method of adding data before/during the "failure" so you can test the results of the recovery.
    Also stop and think about recoveries I have not listed.
    Happy testing.
    Best Regards
    mseberg

  • Types  Recovery Diff

    hi,
    What is the difference or meaning of
    Cancel Based, Time Based and Change Based Recovery
    Thanks & regards..

    859678 wrote:
    hi,
    What is the difference or meaning of
    Cancel Based, Time Based and Change Based Recovery
    Thanks & regards..Time-based-recovery Recovers the data up to a specified point in time.
    Cancel-based- recovery Recovers until you issue the CANCEL statement (not available when using Recovery Manager).
    Change-based -recovery Recovers until the specified SCN.
    Log sequence -recovery Recovers until the specified log sequence number (only available when using Recovery Manager).
    had better refer the link:-
    Incomplete recovery
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/backrec.htm#i1006524
    also,
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/backrec.htm

  • Disater recovery dought

    Hi
    i am planning to do a disaster recovery test.I tested with until time.I want to test until scn.eg if i took controlfile backup at 6.00pm then i
    can recover upto that point if i have the archive logs.How can i determine the SCN for giving
    recover database until change SCN using backup controlfile.How can i get the last scn till that able to recovery.
    One more dought at what scenario the cancel based recovery will use.Is it loosing the current online redologs?
    with regards
    ramya

    The Stateless failover is used when the primary network edge platform fails, IPsec sessions can failover and reconnect to the backup network edge platform, thus minimizing connection downtime.

  • Need suggestion on Data Center Migration

    Hi All,
    We are currently handling a datacenter migration project where in the souce instance is hosted at Oracle Datacenter ( Texas ).
    and the target instance need to be built on **** Hosted datacenter ( U.K).
    -> It takes 3days to ship the (cold) backup from U.S datacenter to UK datacenter. We could able to bring up the database using that. But
    in order to keep the new Instnace in sync with the source ( which is being used by bussiness) we have to apply all the archvies in this gap.
    --> Database size 250G
    --> We could manage to ship the archives generated after cold backup directly to FTP server ( in UK network). But there ar around 3000 - 4000 archives to be applied.
    We have planned to perform a cancel based recovery here.
    In this scenario, need your advice, If we have any other alternative ( Best practice)
    -Regards
    Vinay

    Hi,
    have you seen this:
    WAN Zero Data Loss Failover with Oracle Data Guard 11.2 using a Near-DR Strategy (Broker version)          [Document 1489359.1]
    Regards
    Sebastian

Maybe you are looking for