{"id":219,"date":"2008-12-11T10:45:26","date_gmt":"2008-12-11T09:45:26","guid":{"rendered":"http:\/\/www.askthegerman.com\/?p=219"},"modified":"2023-02-13T07:36:24","modified_gmt":"2023-02-13T06:36:24","slug":"rman-time-based-recovery","status":"publish","type":"post","link":"https:\/\/www.askthegerman.com\/?p=219","title":{"rendered":"RMAN Time Based Recovery"},"content":{"rendered":"<p>Doing a repeated rman database time based recovery<\/p>\n<p>RMAN&gt;<br \/>\nrun{<br \/>\n&#8230;<br \/>\nalter database mount;<br \/>\n&#8230;<br \/>\nset until time &#8220;to_date(&#8216;27.10.2008 23:30:00&#8242;,&#8217;DD.MM.YYYY HH24:MI:SS&#8217;)&#8221;;<br \/>\n&#8230;<br \/>\nrestore database;<br \/>\nrecover database delete archivelog;<br \/>\nalter database open resetlogs;<br \/>\n}<\/p>\n<p>without rman catalog repository can fail with error:<\/p>\n<p>RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time<\/p>\n<p>To solve the issue<\/p>\n<ul>\n<li>      list the incarnation id of the database<\/li>\n<\/ul>\n<p>RMAN&gt; list incarnation;<\/p>\n<p>using target database control file instead of recovery catalog<\/p>\n<p>List of Database Incarnations<\/p>\n<div align=\"left\"><font face=\"Courier\">DB&nbsp; Inc DB Name DB ID&nbsp;&nbsp;&nbsp; STATUS&nbsp; Reset SCN Reset Time<br \/>\nKey Key<br \/>\n<\/font><\/div>\n<div align=\"left\"><\/div>\n<p align=\"left\"><font face=\"Courier\">  1&nbsp;&nbsp; 1&nbsp;&nbsp; ORAV10&nbsp; 76765624 PARENT&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 22.11.2007 16:44:40<br \/>\n2&nbsp;&nbsp; 2&nbsp;&nbsp; ORAV10&nbsp; 76765624 PARENT&nbsp; 4921103&nbsp;&nbsp; 09.04.2008 11:38:07<br \/>\n3&nbsp;&nbsp; 3&nbsp;&nbsp; ORAV10&nbsp; 76765624 ORPHAN&nbsp; 15854298&nbsp; 27.11.2008 11:43:33<br \/>\n4&nbsp;&nbsp; 4&nbsp;&nbsp; ORAV10&nbsp; 76765624 CURRENT 15854298&nbsp; 27.11.2008 17:38:11<\/font><\/p>\n<ul>\n<li> set the database in mount status to incarnation id that is fitting to the selected restore time<\/li>\n<\/ul>\n<p>&nbsp;<br \/>\nRMAN&gt; shutdown immediate;<br \/>\nRMAN&gt; startup mount;<br \/>\nRMAN&gt; reset database to incarnation 2;<\/p>\n<ul>\n<li> repeat the database time based recovery<\/li>\n<\/ul>\n<p>Be careful: Do not restore controlfile. If you do so, incarnation is set the latest id and you run into same error.<\/p>\n<p>RMAN&gt; list incarnation;<\/p>\n<p>List of Database Incarnations<\/p>\n<div align=\"left\"><font face=\"Courier\">DB&nbsp; Inc DB Name DB ID&nbsp;&nbsp;&nbsp; STATUS&nbsp; Reset SCN Reset Time<br \/>\nKey Key<br \/>\n<\/font><\/div>\n<div align=\"left\"><\/div>\n<p align=\"left\"><font face=\"Courier\">  1&nbsp;&nbsp; 1&nbsp;&nbsp; ORAV10&nbsp; 76765624 PARENT&nbsp; 1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 22.11.2007 16:44:40<br \/>\n2&nbsp;&nbsp; 2&nbsp;&nbsp; ORAV10&nbsp; 76765624 PARENT&nbsp; 4921103&nbsp;&nbsp; 09.04.2008 11:38:07<br \/>\n5&nbsp;&nbsp; 5&nbsp;&nbsp; ORAV10&nbsp; 76765624 CURRENT 15783824&nbsp; 10.12.2008 16:03:56<br \/>\n4&nbsp;&nbsp; 4&nbsp;&nbsp; ORAV10&nbsp; 76765624 ORPHAN&nbsp; 15854298&nbsp; 27.11.2008 17:38:11<br \/>\n3&nbsp;&nbsp; 3&nbsp;&nbsp; ORAV10&nbsp; 76765624 ORPHAN&nbsp; 15854298&nbsp; 27.11.2008 11:43:33<br \/>\n<\/font><\/p>\n<p>In some cases you get errors during recovery<br \/>\nORA-00283: recovery session canceled due to errors<br \/>\nORA-00081: address range [0x60000000000A7D70, 0x60000000000A7D74) is not readable<br \/>\nORA-00600: internal error code, arguments: [kcvsor_current_inc_rdfail], [0], [], [], [], [], [], []<\/p>\n<p>In this case you have to restore an adequate controlfile created in selected recovery time frame and that has the same incarnation as the datafiles (see also oracle support Note:378273.1)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Doing a repeated rman database time based recovery RMAN&gt; run{ &#8230; alter database mount; &#8230; set until time &#8220;to_date(&#8216;27.10.2008 23:30:00&#8242;,&#8217;DD.MM.YYYY HH24:MI:SS&#8217;)&#8221;; &#8230; restore database; recover database delete archivelog; alter database open resetlogs; } without rman catalog repository can fail with error: RMAN-20207: UNTIL TIME or RECOVERY WINDOW is before RESETLOGS time To solve the issue [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[260,3,5,31],"tags":[203,202,204,200,43,201],"class_list":["post-219","post","type-post","status-publish","format-standard","hentry","category-backup","category-database","category-oracle","category-tipsntricks","tag-controlfile","tag-list-incarnation","tag-ora-00600","tag-recovery","tag-rman","tag-time-based"],"_links":{"self":[{"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=\/wp\/v2\/posts\/219","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=219"}],"version-history":[{"count":8,"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=\/wp\/v2\/posts\/219\/revisions"}],"predecessor-version":[{"id":359,"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=\/wp\/v2\/posts\/219\/revisions\/359"}],"wp:attachment":[{"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=219"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=219"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.askthegerman.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=219"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}