{"id":73108,"date":"2016-06-29T10:38:44","date_gmt":"2016-06-29T10:38:44","guid":{"rendered":"https:\/\/www.red-gate.com\/simple-talk\/uncategorized\/incomplete-complete-recovery-using-rman-cold-backup\/"},"modified":"2021-07-14T13:07:03","modified_gmt":"2021-07-14T13:07:03","slug":"incomplete-complete-recovery-using-rman-cold-backup","status":"publish","type":"post","link":"https:\/\/www.red-gate.com\/simple-talk\/databases\/oracle-databases\/incomplete-complete-recovery-using-rman-cold-backup\/","title":{"rendered":"Incomplete \/ Complete recovery using RMAN cold backup"},"content":{"rendered":"<p>Offline backups (also known as Cold or consistent backups) are taken when the database is in a consistent state, i.e. the database has been shut down with the SHUTDOWN NORMAL, SHUTDOWN IMMEDIATE, or SHUTDOWN TRANSACTIONAL commands. As part of a consistent shutdown, redo has been applied to the data files and the System Change number (SCN) in the data file headers matches the SCN in control files at the time of backup. Hence, after restoring consistent backups, no media recovery is required and the state of the database is the same as it was at the time of backup. In this case, any transactions made after the backup are lost.<\/p>\n<p>In this article I will demonstrate that offline backup of a database in archivelog mode can be employed to perform:<\/p>\n<ul>\n<li>Point in time recovery<\/li>\n<li>Complete recovery<\/li>\n<\/ul>\n<p>\u2026of the database beyond the time of backup by applying appropriate archive logs. For this demonstration I will be using the HR sample schema.<\/p>\n<h2>Overview<\/h2>\n<ul>\n<li>Verify that the database is in archivelog mode<\/li>\n<li>Create test table HR.EMP which is copy of HR.EMPLOYEES table. Note down initial total SALARY.<\/li>\n<li>Take a cold backup of the database and control file using RMAN<\/li>\n<li>Update SALARY = 0 in HR.EMP and note down current SCN#<\/li>\n<li>Switch the log so that a log file with sequence# where total SALARY = 0 in HR.EMP is archived<\/li>\n<li>Update SALARY = 1000 in HR.EMP and note down current SCN#<\/li>\n<li>Switch the log so that a log file with sequence# containing total SALARY= 107000 in HR.EMP is archived<\/li>\n<li>Simulate loss of the database and restart database \u2013 Database reaches nomount stage as control file is missing<\/li>\n<li>Restore the control file from cold backup<\/li>\n<li>Mount the database and restore data files from cold backup<\/li>\n<li>Perform incomplete recovery until SCN# when total SALARY in HR.EMP is 0<\/li>\n<li>Perform complete recovery by applying all of the available archived logs to the database so that total SALARY in HR.EMP is at its final value of 107000<\/li>\n<\/ul>\n<h2>Demonstration<\/h2>\n<ul>\n<li>Verify that the database is in archivelog mode:<\/li>\n<\/ul>\n<pre>SQL&gt; archive log list;\r\nDatabase log mode              Archive Mode\r\nAutomatic archival             Enabled\r\nArchive destination            USE_DB_RECOVERY_FILE_DEST\r\nOldest online log sequence     2\r\nNext log sequence to archive   4<\/pre>\n<ul>\n<li>Find out names of the control file, online redo log files and data files:<\/li>\n<\/ul>\n<pre>SQL&gt; select name from v$controlfile;\r\n\r\nNAME\r\n--------------------------------------------------------------------------------\r\n\/u01\/app\/oracle\/oradata\/test\/control01.ctl\r\n\r\nSQL&gt; select name from v$datafile;\r\n\r\nNAME\r\n--------------------------------------------------------------------------------\r\n\/u01\/app\/oracle\/oradata\/test\/system01.dbf\r\n\/u01\/app\/oracle\/oradata\/test\/sysaux01.dbf\r\n\/u01\/app\/oracle\/oradata\/test\/undotbs01.dbf\r\n\/u01\/app\/oracle\/oradata\/test\/users01.dbf\r\n\/u01\/app\/oracle\/oradata\/test\/example01.dbf\r\n\r\nSQL&gt; select member from v$logfile;\r\n\r\nMEMBER\r\n--------------------------------------------------------------------------------\r\n\/u01\/app\/oracle\/oradata\/test\/redo03.log\r\n\/u01\/app\/oracle\/oradata\/test\/redo02.log\r\n\/u01\/app\/oracle\/oradata\/test\/redo01.log<\/pre>\n<ul>\n<li>Find out the current SCN and status of redo log groups:<\/li>\n<\/ul>\n<pre>SQL&gt; select current_scn from v$database;\r\n\r\nCURRENT_SCN\r\n-----------\r\n     <span style=\"color: red;\"><strong>817881<\/strong><\/span>\r\n\r\nSQL&gt; select group#, sequence#, status from v$log;\r\n\r\n    GROUP#  SEQUENCE# STATUS\r\n---------- ---------- ----------------\r\n         1          4 CURRENT\r\n         2          2 INACTIVE\r\n         3          3 INACTIVE\r\n<\/pre>\n<ul>\n<li>Create test table HR.EMP which is copy of HR.EMPLOYEES table. Note down initial total SALARY.<\/li>\n<\/ul>\n<pre>SQL&gt; drop table hr.emp purge;        \r\n     create table hr.emp as select * from hr.employees;\r\n     select sum(salary) from hr.emp;\r\n\r\nSUM(SALARY)\r\n-----------\r\n     <span style=\"color: red;\"><strong>691416<\/strong><\/span><\/pre>\n<ul>\n<li>Take a cold backup of the database and control file using RMAN:<\/li>\n<\/ul>\n<pre>SQL&gt; shu immediate;\r\n     startup mount;\r\n\r\n[oracle@node1 orcl]$ rman target \/\r\nRecovery Manager: Release 11.2.0.1.0 - Production on Thu Jun 23 14:36:31 2016\r\n\r\nCopyright (c) 1982, 2009, Oracle and\/or its affiliates.  All rights reserved.\r\n\r\nconnected to target database: TEST (DBID=2213428959, <span style=\"color: red;\"><strong>not open<\/strong><\/span>)\r\n\r\nRMAN&gt; backup <span style=\"color: red;\"><strong>database<\/strong><\/span>;\r\n\r\nStarting backup at 23-JUN-16\r\nusing target database control file instead of recovery catalog\r\nallocated channel: ORA_DISK_1\r\nchannel ORA_DISK_1: SID=21 device type=DISK\r\nchannel ORA_DISK_1: starting full datafile backup set\r\nchannel ORA_DISK_1: specifying datafile(s) in backup set\r\ninput datafile file number=00001 name=\/u01\/app\/oracle\/oradata\/test\/system01.dbf\r\ninput datafile file number=00002 name=\/u01\/app\/oracle\/oradata\/test\/sysaux01.dbf\r\ninput datafile file number=00005 name=\/u01\/app\/oracle\/oradata\/test\/example01.dbf\r\ninput datafile file number=00003 name=\/u01\/app\/oracle\/oradata\/test\/undotbs01.dbf\r\ninput datafile file number=00004 name=\/u01\/app\/oracle\/oradata\/test\/users01.dbf\r\nchannel ORA_DISK_1: starting piece 1 at 23-JUN-16\r\nchannel ORA_DISK_1: finished piece 1 at 23-JUN-16\r\npiece <span style=\"color: red;\"><strong>handle=\/u01\/app\/oracle\/flash_recovery_area\/TEST\/backupset\/2016_06_23\/o1_mf_nnndf_TAG20160623T143738_cpq9pv2z_.bkp<\/strong><\/span> tag=TAG20160623T143738 comment=NONE\r\nchannel ORA_DISK_1: backup set complete, elapsed time: 00:01:11\r\nchannel ORA_DISK_1: starting full datafile backup set\r\nchannel ORA_DISK_1: specifying datafile(s) in backup set\r\nincluding current control file in backup set\r\nincluding current SPFILE in backup set\r\nchannel ORA_DISK_1: starting piece 1 at 23-JUN-16\r\nchannel ORA_DISK_1: finished piece 1 at 23-JUN-16\r\npiece handle=\/u01\/app\/oracle\/flash_recovery_area\/TEST\/backupset\/2016_06_23\/o1_mf_ncsnf_TAG20160623T143738_cpq9s3gw_.bkp tag=TAG20160623T143738 comment=NONE\r\nchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01\r\nFinished backup at 23-JUN-16\r\n\r\nRMAN&gt; backup current <span style=\"color: red;\"><strong>controlfile<\/strong><\/span>;\r\n\r\nStarting backup at 23-JUN-16\r\nusing channel ORA_DISK_1\r\nchannel ORA_DISK_1: starting full datafile backup set\r\nchannel ORA_DISK_1: specifying datafile(s) in backup set\r\nincluding current control file in backup set\r\nchannel ORA_DISK_1: starting piece 1 at 23-JUN-16\r\nchannel ORA_DISK_1: finished piece 1 at 23-JUN-16\r\npiece <span style=\"color: red;\"><strong>handle=\/u01\/app\/oracle\/flash_recovery_area\/TEST\/backupset\/2016_06_23\/o1_mf_ncnnf_TAG20160623T144001_cpq9vb51_.bkp<\/strong><\/span> tag=TAG20160623T144001 comment=NONE\r\nchannel ORA_DISK_1: backup set complete, elapsed time: 00:00:01\r\nFinished backup at 23-JUN-16<\/pre>\n<ul>\n<li>Open the database and note down the currently-active redo log group \/ sequence#:<\/li>\n<\/ul>\n<pre>SQL&gt; alter database open;\r\n\r\nSQL&gt; select group#, sequence#, status from v$log;\r\n\r\n    GROUP#  SEQUENCE# STATUS\r\n---------- ---------- ----------------\r\n         <span style=\"color: red;\"><strong>1          4 CURRENT<\/strong><\/span>\r\n         2          2 INACTIVE\r\n         3          3 INACTIVE<\/pre>\n<ul>\n<li>Update SALARY = 0 in HR.EMP and note down the current SCN#:<\/li>\n<\/ul>\n<pre>SQL&gt;update hr.emp set salary = 0;\r\n    commit;\r\n    select sum(salary) from hr.emp;\r\n\r\nSUM(SALARY)\r\n-----------\r\n          <span style=\"color: red;\"><strong>0<\/strong><\/span>\r\n\r\nSQL&gt;select current_scn from v$database;\r\n\r\nCURRENT_SCN\r\n-----------\r\n     <span style=\"color: red;\"><strong>818237<\/strong><\/span><\/pre>\n<ul>\n<li>Switch the log so that log file with sequence# 4 having total SALARY = 0 is archived:<\/li>\n<\/ul>\n<pre>SQL&gt; alter system switch logfile; \r\n     select name, FIRST_CHANGE#, SEQUENCE# from v$archived_log;\r\n\r\nNAME\r\n--------------------------------------------------------------------------------\r\nFIRST_CHANGE#  SEQUENCE#\r\n------------- ----------\r\n\/u01\/app\/oracle\/flash_recovery_area\/TEST\/archivelog\/2016_06_23\/o1_mf_1_3_cpq9fqx\r\nn_.arc\r\n       792758          3\r\n\r\n<span style=\"color: red;\"><strong>\/u01\/app\/oracle\/flash_recovery_area\/TEST\/archivelog\/2016_06_23\/o1_mf_1_4_cpqb0jm<\/strong><\/span>\r\n<span style=\"color: red;\"><strong>y_.arc<\/strong><\/span>\r\n       <span style=\"color: red;\"><strong>817738          4<\/strong><\/span><\/pre>\n<ul>\n<li>Note down the currently active redo log group \/ sequence#:<\/li>\n<\/ul>\n<pre>SQL&gt; select group#, sequence#, status from v$log;\r\n\r\n    GROUP#  SEQUENCE# STATUS\r\n---------- ---------- ----------------\r\n         1          4 ACTIVE\r\n         <span style=\"color: red;\"><strong>2          5 CURRENT<\/strong><\/span>\r\n         3          3 INACTIVE<\/pre>\n<ul>\n<li>Update SALARY = 1000 in HR.EMP and note down current SCN#:<\/li>\n<\/ul>\n<pre>SQL&gt;update hr.emp set salary = 1000;\r\n    commit;\r\n    select sum(salary) from hr.emp;\r\n\r\nSUM(SALARY)\r\n-----------\r\n     <span style=\"color: red;\"><strong>107000<\/strong><\/span>\r\n\r\nSQL&gt; select current_scn from v$database;\r\n\r\nCURRENT_SCN\r\n-----------\r\n     <span style=\"color: red;\"><strong>818267<\/strong><\/span><\/pre>\n<ul>\n<li>Switch the log so that the log file with sequence# 5 containing total SALARY= 107000 is archived:<\/li>\n<\/ul>\n<pre>SQL&gt; alter system switch logfile;\r\n     select name, FIRST_CHANGE#, SEQUENCE# from v$archived_log;\r\n\r\nNAME\r\n--------------------------------------------------------------------------------\r\nFIRST_CHANGE#  SEQUENCE#\r\n------------- ----------\r\n\/u01\/app\/oracle\/flash_recovery_area\/TEST\/archivelog\/2016_06_23\/o1_mf_1_3_cpq9fqx\r\nn_.arc\r\n       792758          3\r\n\r\n\/u01\/app\/oracle\/flash_recovery_area\/TEST\/archivelog\/2016_06_23\/o1_mf_1_4_cpqb0jm\r\ny_.arc\r\n       817738          4\r\n\r\n<span style=\"color: red;\"><strong>\/u01\/app\/oracle\/flash_recovery_area\/TEST\/archivelog\/2016_06_23\/o1_mf_1_5_cpqb2jv<\/strong><\/span>\r\n<span style=\"color: red;\"><strong>3_.arc<\/strong><\/span>\r\n       <span style=\"color: red;\"><strong>818245          5<\/strong><\/span><\/pre>\n<ul>\n<li>Simulate loss of the database and restart the database \u2013 Database reaches the nomount stage as its control file is missing:<\/li>\n<\/ul>\n<pre>[oracle@node1 ~]$ mkdir -p \/u01\/app\/oracle\/oradata\/test_107000\r\n                  mv \/u01\/app\/oracle\/oradata\/test\/* \/u01\/app\/oracle\/oradata\/test_107000\/\r\n\r\nSQL&gt; alter tablespace example offline;\r\n\r\n     alter tablespace example online;\r\nalter tablespace example online\r\n*\r\nERROR at line 1:\r\nORA-01157: cannot identify\/lock data file 5 - see DBWR trace file\r\nORA-01110: data file 5: '\/u01\/app\/oracle\/oradata\/test\/example01.dbf'\r\n\r\nSQL&gt; shu abort;\r\n     startup\r\nORACLE instance started.\r\n\r\nTotal System Global Area  385003520 bytes\r\nFixed Size                  1336708 bytes\r\nVariable Size             125831804 bytes\r\nDatabase Buffers          251658240 bytes\r\nRedo Buffers                6176768 bytes\r\n<span style=\"color: red;\"><strong>ORA-00205: error in identifying control file, check alert log for more info<\/strong><\/span><\/pre>\n<ul>\n<li>Restore the control file from cold backup:<\/li>\n<\/ul>\n<pre>Recovery Manager complete.\r\n[oracle@node1 orcl]$ rman target \/\r\n\r\nRecovery Manager: Release 11.2.0.1.0 - Production on Thu Jun 23 14:45:14 2016\r\n\r\nCopyright (c) 1982, 2009, Oracle and\/or its affiliates.  All rights reserved.\r\n\r\nconnected to target database: TEST (<span style=\"color: red;\"><strong>not mounted<\/strong><\/span>)\r\n\r\n\r\nRMAN&gt; restore controlfile from '\/u01\/app\/oracle\/flash_recovery_area\/TEST\/backupset\/2016_06_23\/o1_mf_ncnnf_TAG20160623T144001_cpq9vb51_.bkp';\r\n\r\nStarting restore at 23-JUN-16\r\nusing channel ORA_DISK_1\r\n\r\nchannel ORA_DISK_1: <span style=\"color: red;\"><strong>restoring control file<\/strong><\/span>\r\nchannel ORA_DISK_1: restore complete, elapsed time: 00:00:01\r\noutput file name=\/u01\/app\/oracle\/oradata\/test\/control01.ctl\r\n<span style=\"color: red;\"><strong>Finished restore<\/strong><\/span> at 23-JUN-16<\/pre>\n<ul>\n<li>Mount the database and restore data files:<\/li>\n<\/ul>\n<pre>SQL&gt; alter database mount;\r\n\r\nRMAN&gt; restore database;\r\n\r\nStarting restore at 23-JUN-16\r\nreleased channel: ORA_DISK_1\r\nStarting implicit crosscheck backup at 23-JUN-16\r\nallocated channel: ORA_DISK_1\r\nchannel ORA_DISK_1: SID=21 device type=DISK\r\nCrosschecked 2 objects\r\nFinished implicit crosscheck backup at 23-JUN-16\r\n\r\nStarting implicit crosscheck copy at 23-JUN-16\r\nusing channel ORA_DISK_1\r\nFinished implicit crosscheck copy at 23-JUN-16\r\n\r\nsearching for all files in the recovery area\r\ncataloging files...\r\ncataloging done\r\n\r\nList of Cataloged Files\r\n=======================\r\nFile Name: \/u01\/app\/oracle\/flash_recovery_area\/TEST\/archivelog\/2016_06_23\/o1_mf_1_5_cpqb2jv3_.arc\r\nFile Name: \/u01\/app\/oracle\/flash_recovery_area\/TEST\/archivelog\/2016_06_23\/o1_mf_1_4_cpqb0jmy_.arc\r\nFile Name: \/u01\/app\/oracle\/flash_recovery_area\/TEST\/backupset\/2016_06_23\/o1_mf_ncnnf_TAG20160623T144001_cpq9vb51_.bkp\r\n\r\nusing channel ORA_DISK_1\r\n\r\nchannel ORA_DISK_1: starting datafile backup set restore\r\nchannel ORA_DISK_1: specifying datafile(s) to restore from backup set\r\nchannel ORA_DISK_1: restoring datafile 00001 to \/u01\/app\/oracle\/oradata\/test\/system01.dbf\r\nchannel ORA_DISK_1: restoring datafile 00002 to \/u01\/app\/oracle\/oradata\/test\/sysaux01.dbf\r\nchannel ORA_DISK_1: restoring datafile 00003 to \/u01\/app\/oracle\/oradata\/test\/undotbs01.dbf\r\nchannel ORA_DISK_1: restoring datafile 00004 to \/u01\/app\/oracle\/oradata\/test\/users01.dbf\r\nchannel ORA_DISK_1: restoring datafile 00005 to \/u01\/app\/oracle\/oradata\/test\/example01.dbf\r\nchannel ORA_DISK_1: <span style=\"color: red;\"><strong>reading from backup piece \/u01\/app\/oracle\/flash_recovery_area\/TEST\/backupset\/2016_06_23\/o1_mf_nnndf_TAG20160623T143738_cpq9pv2z_.bkp<\/strong><\/span>\r\nchannel ORA_DISK_1: piece handle=\/u01\/app\/oracle\/flash_recovery_area\/TEST\/backupset\/2016_06_23\/o1_mf_nnndf_TAG20160623T143738_cpq9pv2z_.bkp tag=TAG20160623T143738\r\nchannel ORA_DISK_1: restored backup piece 1\r\nchannel ORA_DISK_1: <span style=\"color: red;\"><strong>restore complete<\/strong><\/span>, elapsed time: 00:01:20\r\nFinished restore at 23-JUN-16<\/pre>\n<p>Now the data in the database is as it was at the time when the cold backup was taken, and the total SALARY in HR.EMP was at its initial value of 691416. Since the cold backup has been restored, no media recovery is needed and the database can be opened. But if we do so, we will lose the transactions made after the backup was taken. Since the database is in archivelog mode, we can roll the database forward to the time after the backup by applying the archived logs.<\/p>\n<ul>\n<li>Perform incomplete recovery till SCN# = 818237 when total SALARY in HR.EMP was 0. Note that archived log for sequence# 4 which contained the above change of setting salary to 0 has been applied.<\/li>\n<\/ul>\n<pre>RMAN&gt; recover database until scn <span style=\"color: red;\"><strong>818237<\/strong><\/span>;\r\n\r\nStarting recover at 23-JUN-16\r\nusing channel ORA_DISK_1\r\n\r\nstarting media recovery\r\n\r\narchived log for thread 1 with sequence 4 is already on disk as file \/u01\/app\/oracle\/flash_recovery_area\/TEST\/archivelog\/2016_06_23\/o1_mf_1_4_cpqb0jmy_.arc\r\n<span style=\"color: red;\"><strong>archived log file name=\/u01\/app\/oracle\/flash_recovery_area\/TEST\/archivelog\/2016_06_23\/o1_mf_1_4_cpqb0jmy_.arc thread=1 sequence=4<\/strong><\/span>\r\nmedia recovery complete, elapsed time: 00:00:00\r\nFinished recover at 23-JUN-16\r\n\r\nSQL&gt; alter database open read only;\r\n\r\n     select sum(salary) from hr.emp;\r\n\r\nSUM(SALARY)\r\n-----------\r\n          <span style=\"color: red;\"><strong>0<\/strong><\/span><\/pre>\n<p>Thus we have successfully performed point in time recovery by applying relevant archived logs to the datafiles restored from cold backup.<\/p>\n<p>Now we will perform complete recovery by applying all of the available archived logs to the database and bringing it to the point when total SALARY in HR.EMP was finally set to 107000. It can be seen that only one archived log for sequence# 5 is available and it has been applied.<\/p>\n<pre>SQL&gt; shu immediate;\r\n     startup mount;\r\nSQL&gt; recover database until cancel using backup controlfile;\r\n\r\nORA-00279: change 818245 generated at 06\/23\/2016 14:42:48 needed for thread 1\r\nORA-00289: suggestion :\r\n\/u01\/app\/oracle\/flash_recovery_area\/TEST\/archivelog\/2016_06_23\/o1_mf_1_5_cpqb2jv\r\n3_.arc\r\nORA-00280: <span style=\"color: red;\"><strong>change 818245 for thread 1 is in sequence #5<\/strong><\/span>\r\n\r\n\r\nSpecify log: {=suggested | filename | AUTO | CANCEL}\r\n\r\nORA-00279: change 818274 generated at 06\/23\/2016 14:43:52 needed for thread 1\r\nORA-00289: suggestion :\r\n\/u01\/app\/oracle\/flash_recovery_area\/TEST\/archivelog\/2016_06_23\/o1_mf_1_6_%u_.arc\r\nORA-00280: change 818274 for thread 1 is in sequence #6\r\nORA-00278: log file\r\n<span style=\"color: red;\"><strong>'\/u01\/app\/oracle\/flash_recovery_area\/TEST\/archivelog\/2016_06_23\/o1_mf_1_5_cpqb2j<\/strong><\/span>\r\n<span style=\"color: red;\"><strong>v3_.arc' no longer needed for this recovery<\/strong><\/span>\r\n\r\n\r\nSpecify log: {=suggested | filename | AUTO | CANCEL}\r\n\r\nORA-00308: <span style=\"color: red;\"><strong>cannot open archived log<\/strong><\/span>\r\n<span style=\"color: red;\"><strong>'\/u01\/app\/oracle\/flash_recovery_area\/TEST\/archivelog\/2016_06_23\/o1_mf_1_6_%u_.ar<\/strong><\/span>\r\n<span style=\"color: red;\"><strong>c'<\/strong><\/span>\r\nORA-27037: unable to obtain file status\r\nLinux Error: 2: No such file or directory\r\nAdditional information: 3<\/pre>\n<ul>\n<li>Let us cancel the recovery, since the archived log for sequence 6 is not available:<\/li>\n<\/ul>\n<pre>SQL&gt; recover database until cancel using backup controlfile;\r\nORA-00279: change 818274 generated at 06\/23\/2016 14:43:52 needed for thread 1\r\nORA-00289: suggestion :\r\n<span style=\"color: red;\"><strong>\/u01\/app\/oracle\/flash_recovery_area\/TEST\/archivelog\/2016_06_23\/o1_mf_1_6_%u_.arc<\/strong><\/span>\r\n<span style=\"color: red;\"><strong>ORA-00280: change 818274 for thread 1 is in sequence #6<\/strong><\/span>\r\n\r\n\r\nSpecify log: {=suggested | filename | AUTO | CANCEL}\r\n<span style=\"color: red;\"><strong>cancel <\/strong><\/span>\r\n<span style=\"color: red;\"><strong>Media recovery cancelled<\/strong><\/span>.<\/pre>\n<ul>\n<li>Open the database and verify that it has been recovered completely, i.e. that SALARY in HR.EMP is at its final value of 107000:<\/li>\n<\/ul>\n<pre>SQL&gt; alter database open resetlogs;\r\n\r\nSQL&gt; select sum(salary) from hr.emp;\r\n\r\nSUM(SALARY)\r\n-----------\r\n     <span style=\"color: red;\"><strong>107000<\/strong><\/span><\/pre>\n<p>Thus we have successfully performed complete recovery of the database by applying all the available archived logs to the datafiles restored from cold backup.<\/p>\n<h2>Summary:<\/h2>\n<ul>\n<li>Offline backups, also known as Cold or consistent backups, are taken when the database is in a consistent state.<\/li>\n<li>After restoring consistent backups, the database can be opened without performing media recovery is required and the state of the database is as it was at the time of backup. But in this case, any transactions made after the backup are lost.<\/li>\n<li>Offline backup of a database in archivelog mode can be employed to perform:\n<ul>\n<li>Point in time recovery<\/li>\n<li>Complete recovery<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u2026of the database beyond the time of backup by applying appropriate archive logs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Offline backups (also known as Cold or consistent backups) are taken when the database is in a consistent state, i.e. the database has been shut down with the SHUTDOWN NORMAL, SHUTDOWN IMMEDIATE, or SHUTDOWN TRANSACTIONAL commands. As part of a consistent shutdown, redo has been applied to the data files and the System Change number (SCN) in the data f&hellip;<\/p>\n","protected":false},"author":316217,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[143533],"tags":[4598,48492],"coauthors":[],"class_list":["post-73108","post","type-post","status-publish","format-standard","hentry","category-oracle-databases","tag-recovery","tag-rman"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/73108","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/users\/316217"}],"replies":[{"embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/comments?post=73108"}],"version-history":[{"count":1,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/73108\/revisions"}],"predecessor-version":[{"id":91607,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/posts\/73108\/revisions\/91607"}],"wp:attachment":[{"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/media?parent=73108"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/categories?post=73108"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/tags?post=73108"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.red-gate.com\/simple-talk\/wp-json\/wp\/v2\/coauthors?post=73108"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}