You are on page 1of 12

OBT BACKUP & RECOVERY SCENARIOS

Scenario 1: A datafile is offline/Online - tablespace, which contains the datafile, is online.


Details: Tablespace T *atafile + *atafile 2 *atafile ,

Tablespace T is online , however, datafile 2 is corrupted. The datafile 2 may be online or offline. OBT Recovery: (a) Archivelog mode In archive log mode O T can recover the datafile 2 using !"ecover selected datafiles# option. $teps followed by the O T for recovery will be % It will ta&e the tablespace associated with the data files to be recoverd in offline mode. It restores the selected datafiles and recover it applying the archive logs. It will ma&e the tablespace online which are made offline, after completing the recovery of datafile. It also puts the datafiles online even if they where offline before recovery. 'or e(ample the datafile 2 was offline before recovery, it will be put in online after recovery of the datafile 2. (!) NoArchivelog mode In )oArchive mode !$elected datafiles recovery ! is not possible.

Scenario 2: -oint in time /.hange based /$.)0 "ecovery of a database.


Details: In an archivelog mode database, a complete cold bac&up is ta&en at a point T+. Then database operation resumes. 1ater, at a time T2, a datafile accidentally gets corrupted. It is re2uired to recover the database upto a point in time between the time of the bac&up and the current time. The same can be illustrated by the following figure.

T+ /cold full bac&up0

Tp /point upto which recovery to be done0

T2 /current time0

(a) Archivelog mode In order to perform a point in time recovery in this scenario, select the !perform time based recovery ! or !-erform change based recovery# option of O T. $teps followed by the O T for recovery will be % It will shutdown the database with $34T*O5) A O"T. "estores the datafiles from the latest complete bac&up. Applies the incremental /.umulative bac&ups. "estores the bac&up control file. Open the database in restricted mode. All the datafile are put online./Other wise the recovery of offline datafiles is not possible.0 "estores the archive logs from bac&up if necessary and applies archive logs and redo logs if necessary to recover till the point in time. Open database with reset logs. (!)Noarchivelog mode In )oarchive log mode the point in time recovery is not possible. $o O T will not give the menu option for -oint in time recovery in no archive mode.

Scenario 3: -oint in time /.hange based /$.)0 "ecovery of a database with multiple Incarnations.
Details: In an archivelog mode database, a complete full bac&up is ta&en at a point T+ and T2/After the new incarnation0. Then database operation resumes. 1ater, at a time T,, a datafile accidentally gets corrupted. It is re2uired to recover the database upto a point in time between the time of the bac&up and the current time. The same can be illustrated by the following figure. /"eset logs, Incarnation2 'ull complete bac&up after icarnation0

T+ /full complete bac&up0 (a) Archivelog mode

T2

Tp /point/$.) upto which recovery to be done0

T, /current time0

In order to perform a point in time recovery in this scenario, select the !perform time based recovery ! or !-erform change based recovery# option of O T. After that O T will show the incarnations and the time spans or low $.)s for the incarnations. *epending upon the point in time or the $.) the incarnation need to be selected. $teps followed by the O T for recovery will be % It will shutdown the database with $34T*O5) A O"T. "estores the datafiles from the latest complete bac&up of the incarnation. Applies the incremental bac&ups if any. "estores the bac&up control file. Open the database in restricted mode. All the datafile are put online./Other wise the recovery of offline datafiles is not possible.0 "estores the archive logs from bac&up if necessary and applies archive logs and redo logs if necessary to recover till the point in time or till the change /$.)0 provided by user. Open database with reset logs. (!)Noarchivelog mode

In )oarchive log mode the point in time or changed based recovery is not possible. $o O T will not give the menu option for -oint in time recovery in no archive mode. It can restore the till point in of the full complete bac&up.

Scenario 4: Online "edo logs are corrupted.


Details: In an archive log mode database, a complete cold bac&up is ta&en at a point T+. Then database operation resumes. 1ater, at a time T2, a redo log files gets corrupted. It re2uires to recover the database. The same can be illustrated by the following figure.

T+ /.omplete full bac&up0

T2 /.urrent time0

(a) Archivelog mode 5e can recover the data base in case of the redo logs are corrupted. 5e have to do the recovery of the database using the !recover selected data files# for the redo log files. $teps followed by the O T for recovery will be % It will shutdown the database with $34T*O5) A O"T. "estores the datafiles from the latest complete bac&up. Applies the incremental /.umulative bac&ups. "estores the bac&up control file. Open the database in restricted mode. All the datafile are put online./Other wise the recovery of offline datafiles is not possible.0 "estores the archive logs from bac&up if necessary and applies archive logs and tries to apply the ma(imum changes from archive logs and the redologs which are not corrupted, if any. Open database with reset logs. $hutdown and clean startup the database. (!)Noarchivelog mode )A

Scenario 5: $ome of Online "edo logs are lost.


Details: In an archive log mode database, a complete full bac&up is ta&en at a point T+. Then database operation resumes. 1ater, at a time T2, some redo log files get lost. The same can be illustrated by the following figure.

T+ /.omplete full bac&up0

T2 /.urrent time0

(a) Archivelog mode As we start select !recover a database!option of O T , it will analy6e and show the missing files. It will also show the redo logs missing. 5e have to select the option !"estore only missing files# and continue. $teps followed by the O T for recovery will be % It will shutdown the database with $34T*O5) A O"T. "estores all datafiles from the latest complete bac&up. Applies the incremental /.umulative bac&ups. "estores the bac&up control file. Open the database in restricted mode. All the datafile are put online./Other wise the recovery of offline datafiles is not possible.0 "estores the archive logs from bac&up if necessary and applies archive logs and tries to apply the ma(imum changes from archive logs and the redologs available, if any. Open database with reset logs. (!)Noarchivelog mode )A

Scenario 6: "ecovery of user tablespaces.


Details: In an archive log mode database, a full complete bac&up is ta&en at a point T+. Then database operation resumes. 1ater, at a time T2, datafiles associated with a particular tablespace is/are corrupted. The same can be illustrated by the following figure.

T+ /full complete bac&up0

T2 /.urrent time0

(a) Archivelog mode 5e start select !recover a database! option of O T . 5e have to select the option !"estore selected datafiles# and continue. 5e have to select the files associated with the tablespace which are corrupted. $teps followed by the O T for recovery will be % It will ta&e tablespace offline immediately. "estores selected datafiles from the latest complete bac&up associated with the tablespace to be recovered. Applies the incremental /.umulative bac&ups for those restored files. "estores the archive logs from bac&up if necessary and applies archive logs and tries to apply the changes from archive logs and the redologs available, so that it will ma&e the restored files consistent with other data and control files. rings the tablespaces online . No"e Poi#" i# "ime or SCN !a$ed recover% o& $elec"ed "a!le$'ace$ or da"a&ile$ are #o" 'o$$i!le a$ "he o"her $%$"em &ile$ a#d da"a&ile$ (ill #o" !e i# co#$i$"e#" $"a"e) (!)Noarchivelog mode )A

Scenario 7: "ecovery of system tablespaces/system tablespaces in bac&up mode.


Details: In an archive log mode database, a full complete bac&up is ta&en at a point T+. Then database operation resumes. 1ater, at a time T2, datafiles associated with a particular system tablespace is/are corrupted. The same can be illustrated by the following figure.

T+ /.omplete full bac&up0

T2 /.urrent time0

(a) Archivelog mode 5e start select !recover a database! option of O T . 5e have to select the option !"estore selected datafiles# and continue. 5e have to select the files associated with the tablespace which are corrupted. $teps followed by the O T for recovery will be % It will shutdown the database instance with A O"T. "estores selected datafiles from the latest complete bac&up associated with the tablespace to be recovered. Applies the incremental /.umulative bac&ups for those restored files. Opens the database in the restricted mode. "estores the archive logs from bac&up if necessary and applies archive logs and tries to apply the changes from archive logs and the redologs available, so that it will ma&e the restored files consistent with other data and control files. rings the database down and start it again for clean startup.

(!)Noarchivelog mode )A

Scenario 8: "ecovery of user tablespace, which is in bac&up mode.


Details: In an archive log mode database, a full complete bac&up is ta&en at a point T+. Then database operation resumes. 1ater, at a time T2, datafiles associated with a particular tablespace is/are corrupted and the tablespace is already in the recovery mode. The same can be illustrated by the following figure.

T+ /full complete bac&up0

T2 /.urrent time0

(a) Archivelog mode 5e start select !recover a database! option of O T . 5e have to select the option !"estore selected datafiles# and continue. 5e have to select the files associated with the tablespace, which are corrupted and the files associated with tablespace are already in begin bac&up mode. $teps followed by the O T for recovery will be % It will ta&e tablespace offline immediately. "estores selected datafiles from the latest complete bac&up associated with the tablespace to be recovered. Applies the incremental /.umulative bac&ups for those restored files. "estores the archive logs from bac&up if necessary and applies archive logs and tries to apply the changes from archive logs and the redologs available, so that it will ma&e the restored files consistent with other data and control files. rings the tablespaces online and put it also in end bac&up mode. No"e Poi#" i# "ime or SCN !a$ed recover% o& $elec"ed "a!le$'ace$ or da"a&ile$ are #o" 'o$$i!le a$ "he o"her $%$"em &ile$ a#d da"a&ile$ (ill #o" !e i# co#$i$"e#" $"a"e) (!)Noarchivelog mode )A.

Scenario 9: "ecovery of read-only tablespace /.omplete0


Details: In an archive log mode database, a full complete bac&up is ta&en at a point T+. Then database operation resumes. 1ater, at a time T2, datafiles associated with a particular read-only tablespace is/are corrupted. The same can be illustrated by the following figure.

T+ /full complete bac&up0

T2 /.urrent time0

(a) Archivelog mode 5e start select !recover a database! option of O T . 5e have to select the option !"estore selected datafiles# and continue. 5e have to select the files associated with the tablespace, which are corrupted. $teps followed by the O T for recovery will be % It will ta&e tablespace offline immediately. "estores selected datafiles from the latest complete bac&up associated with the tablespace to be recovered. Applies the incremental /.umulative bac&ups for those restored files. "estores the archive logs from bac&up if necessary and applies archive logs and tries to apply the changes from archive logs and the redologs available, so that it will ma&e the restored files consistent with other data and control files. rings the tablespaces online. (!)Noarchivelog mode )A

Scenario 10: "ecovery of read-only tablespaces /-oint in time /$.) based recovery0.
Details: In an archive log mode database, a full complete bac&up is ta&en at a point T+. Then database operation resumes. 1ater, at a time T2, datafiles associated with a particular read-only tablespace is/are corrupted. The same can be illustrated by the following figure.

T+ /full complete bac&up0

T2 /.urrent time0

(a) Archivelog mode 5e start select !recover a database! option of O T . 5e have to select the option !Time based recovery#/ !.hange based "ecovery# and continue. $teps followed by the O T for recovery will be % It will shutdown the database with $34T*O5) A O"T. "estores all datafiles from the latest complete bac&up. Applies the incremental /.umulative bac&ups. "estores the bac&up control file. Open the database in restricted mode. Ta&es the files associated with readonly tablespaces offline All the other datafile are put online./Other wise the recovery of offline datafiles is not possible.0 "estores the archive logs from bac&up if necessary and applies archive logs and tries to apply the ma(imum changes from archive logs and the redologs available, if any. Open database with reset logs. -uts all the readonly tablspaces online.

(!)Noarchivelog mode

NA

Scenario 11: 7ffect of system date change and point in time recovery.
Details: 'ull bac&ups of a database are ta&en as follows%

+%88pm /full bac&up0

2%88pm /full bac&up0

,%88 pm /system time changed to +%88 pm0

9%88pm 2%88 pm

4sing O T the database is bac&ed up at +%88 pm , and 2%88 pm. )ow at ,%88 pm, the system time is changed bac& to +%88 pm for some reason. $o, when it is now 2%88pm, actually, it is 9%88 pm. )ow, if a point in time recovery is to be performed, it can only be done upto 2%88 pm /as per the previous system time0. This is because after change in time, current time is 2%88 pm and we cannot recover upto a point in time ahead of current time. In the same scenario, if a bac&up is ta&en immediately after the system time is changed, then we now have two bac&ups ta&en at +%88 pm. $o now, if we try to recover the database upto a point in time between +%88 pm and 2%88 pm, O T will restore the latest full bac&up ta&en at +%88 -:/,%88 -: actual time0 and do the recovery .If we recover the database till +%;8 -: it will recover the database till new +%;8 -: /original time ,%;8 -:0. (a) Archivelog mode 5e start select !recover a database! option of O T . 5e have to select the option !-oint in time recovery# and continue. 5e have to give the point in time to recover /5hich can not be greater than current system time0. $teps followed by the O T for recovery will be % "estores datafiles from the latest complete bac&up, which satisfies the point in time criteria. Applies the incremental /.umulative bac&ups for those restored files till point in time. "estores the archive logs from bac&up if necessary and applies archive logs and tries to apply the changes from archive logs and the redologs available, so that it will ma&e the restored files consistent with other data and control files. rings up the system with resetlogs. (!)Noarchivelog mode NA

Scenario 12: "ecovery of datafile/s0 not having full bac&up.


Details: In an archive log mode database, we don<t have a full complete bac&up ta&en at a point T+. 1ater, at a time T2, datafile/s0 is/are corrupted. The same can be illustrated by the following figure.

T+

T2 /.urrent time0

(a) Archivelog mode 5e start select !recover a database! option of O T . 5e have to select the option !"estore selected datafiles# and continue. 5e have to select the files, which are corrupted. $teps followed by the O T for recovery will be % It will ta&e tablespace associated with datafile/s0 offline immediately. .reates the datafile/s0 . "estores the archive logs from bac&up if necessary and applies archive logs and tries to apply the changes from archive logs and the redologs available, so that it will ma&e the restored files consistent with other data and control files. rings the tablespaces online. (!)Noarchivelog mode NA

You might also like