{"id":32505,"date":"2020-12-15T19:13:45","date_gmt":"2020-12-15T19:13:45","guid":{"rendered":"https:\/\/ittutorial.org\/?p=32505"},"modified":"2020-12-15T19:13:45","modified_gmt":"2020-12-15T19:13:45","slug":"rman-06571-datafile-1-does-not-have-recoverable-copy","status":"publish","type":"post","link":"https:\/\/ittutorial.org\/rman-06571-datafile-1-does-not-have-recoverable-copy\/","title":{"rendered":"RMAN-06571: datafile 1 does not have recoverable copy"},"content":{"rendered":"<p>I got &#8221; RMAN-06571: datafile 1 does not have recoverable copy<strong>\u00a0<\/strong>&#8221; error in Oracle database during restore database.<\/p>\n<p><!--more--><\/p>\n<p>&nbsp;<\/p>\n<h2><span style=\"color: #ff0000;\">RMAN-06571: datafile 1 does not have recoverable copy<\/span><\/h2>\n<p>&nbsp;<\/p>\n<p>Details of error are as follows.<\/p>\n<p>&nbsp;<\/p>\n<pre><strong>RMAN&gt; switch database to copy;<\/strong><\/pre>\n<pre>\r\nRMAN-00571: ===========================================================\r\nRMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============\r\nRMAN-00571: ===========================================================\r\nRMAN-03002: failure of switch to copy command at 12\/10\/2020 14:23:30\r\nRMAN-06571: datafile 1 does not have recoverable copy\r\n\r\nRMAN&gt;<\/pre>\n\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<h3><span style=\"color: #ff0000;\">List Incarnation &amp; Reset Incarnation<\/span><\/h3>\n<p>The <span style=\"color: #ff0000;\"><strong>RMAN-06571\u00a0<\/strong><\/span>error is related with the Incarnation of database.<\/p>\n<pre>RMAN&gt; list incarnation;\r\n\r\nusing target database control file instead of recovery catalog\r\n\r\nList of Database Incarnations\r\nDB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time\r\n------- ------- -------- ---------------- --- ---------- ----------\r\n1 1 MSDB 2054866743 PARENT 1 31-MAY-18\r\n2 2 MSDB 2054866743 CURRENT 16874766827308 26-NOV-20<\/pre>\n<p>&nbsp;<\/p>\n<p>To solve this error, Reset database to right incarnation as follows.<\/p>\n<pre>RMAN&gt; reset database to incarnation 1;\r\n\r\ndatabase reset to incarnation 1\r\n\r\nRMAN&gt; list incarnation;\r\n\r\n\r\nList of Database Incarnations\r\nDB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time\r\n------- ------- -------- ---------------- --- ---------- ----------\r\n1 1 MSDB 2054866743 CURRENT 1 31-MAY-18\r\n2 2 MSDB 2054866743 ORPHAN 16874766827308 26-NOV-20\r\n\r\nRMAN&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p>The other scenario is as follows.<\/p>\n<pre>RMAN&gt; RECOVER DATABASE NOREDO;\r\n\r\nStarting recover at 18 JUL 2011 18:12:10\r\nallocated channel: ORA_DISK_1\r\nchannel ORA_DISK_1: sid=267 devtype=DISK\r\nRMAN-00571: ===========================================================\r\nRMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============\r\nRMAN-00571: ===========================================================\r\nRMAN-03002: failure of recover command at 07\/18\/2011 18:12:11\r\nRMAN-06094: datafile 1 must be restored<\/pre>\n<p>&nbsp;<\/p>\n<p>Often the datafiles do actually reside on disk in either a different directory or filename. So you just need to tell RMAN where they are.<\/p>\n<p>1) If the datafiles are all in the same directory path, you can catalog them all with one command:<\/p>\n<pre class=\"kmcodeblock\">\r\nRMAN&gt; catalog start with 'full pathname';<\/pre>\n<p><span id=\"form1:panelPage1\"><\/p>\n<p><\/span>Otherwise, to catalog an individual datafile:<\/p>\n<pre class=\"kmcodeblock\">\r\nRMAN&gt; catalog datafilecopy 'full path filename';<\/pre>\n<p>2) Confirm that RMAN knows about the newly cataloged datafile copies:<\/p>\n<pre class=\"kmcodeblock\">RMAN&gt; list copy of database;\r\n\r\nRMAN&gt; list copy of datafile n;\r\neg.\r\nRMAN&gt; list copy of datafile 1;\r\n\r\nOR to list multiple copies:\r\nRMAN&gt; list copy of datafile 1,2,3,4;<\/pre>\n<p><span id=\"form1:panelPage1\"><\/span><span id=\"form1:panelPage1\"><\/span><span id=\"form1:panelPage1\"><\/span><\/p>\n<p>3) Rename the datafiles to the correct copy on disk<\/p>\n<p>a) If all datafiles needs to be renamed:<\/p>\n<pre class=\"kmcodeblock\">\r\nRMAN&gt; switch database to copy;<\/pre>\n<p><span id=\"form1:panelPage1\"><\/p>\n<p><\/span>b) If only renaming a single datafile:<\/p>\n<pre class=\"kmcodeblock\">\r\nRMAN&gt; switch datafile n to copy;\r\neg.\r\nRMAN&gt; switch datafile 1 to copy;<\/pre>\n<p><span id=\"form1:panelPage1\"><br \/>\n<\/span><span id=\"17471\"><\/span><span id=\"form1:panelPage1\">c) If renaming a list of files:<\/span><\/p>\n<pre class=\"kmcodeblock\">\r\nRMAN&gt; switch datafile n,o,p,q to copy;\r\neg.\r\nRMAN&gt; switch datafile 1,2,3,4 to copy;<\/pre>\n<p>&nbsp;<\/p>\n<p><span id=\"form1:panelPage1\">\u00a0<span class=\"awizEndDelimiter\">\u00a0<\/span>d) to rename to a specific copy:<\/span><\/p>\n<pre class=\"kmcodeblock\"><span id=\"form1:panelPage1\">RMAN&gt; run {\r\nswitch datafile 'old datafile path and name' to datafilecopy 'new datafile path and name';\r\n}<\/span><\/pre>\n<p><span id=\"form1:panelPage1\">\u00a0<span class=\"awizEndDelimiter\">\u00a0<\/span><br \/>\n4)\u00a0<\/span>The controlfile should now reflect the real datafiles on disk, with their correct size and names.<\/p>\n<pre class=\"kmcodeblock\"><span id=\"form1:panelPage1\">\r\nRMAN&gt; report schema;\r\n\r\n<\/span><span id=\"625798\"><span id=\"form1:panelPage1\">File Size(MB) Tablespace \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 RB segs Datafile Name\r\n---- -------- ----------------- ------- ------------------------\r\n<\/span><span id=\"form1:panelPage1\">1 \u00a0\u00a0 500 \u00a0 \u00a0\u00a0\u00a0 SYSTEM \u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0 *** \u00a0 \u00a0 &lt;ASM PATH&gt;\/system.423.756840583\r\n<\/span><span id=\"form1:panelPage1\">2 \u00a0\u00a0 200\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 UNDOTBS1\u00a0 \u00a0 \u00a0 \u00a0\u00a0 ***\u00a0 \u00a0 \u00a0&lt;ASM PATH&gt;\/undotbs1.258.667475049\r\n3 \u00a0\u00a0 350\u00a0 \u00a0 \u00a0\u00a0 SYSAUX \u00a0\u00a0 \u00a0 \u00a0 \u00a0\u00a0 ***\u00a0 \u00a0 \u00a0&lt;ASM PATH&gt;\/sysaux.257.756996199\r\n4 \u00a0\u00a0 545\u00a0 \u00a0\u00a0\u00a0\u00a0 USERS\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ***\u00a0 \u00a0 \u00a0&lt;ASM PATH&gt;\/users.259.756996261<\/span><\/span><\/pre>\n<p>&nbsp;<\/p>\n<h5><a href=\"https:\/\/ittutorial.org\/oracle-tutorial-oracle-database-tutorials-for-beginners-junior-oracle-dba\/\"><span style=\"color: #ff0000;\">Do you want to learn Oracle Database for Beginners, then Click and read the following articles.<\/span><\/a><\/h5>\n<p><a href=\"https:\/\/ittutorial.org\/oracle-tutorial-oracle-database-tutorials-for-beginners-junior-oracle-dba\/\" target=\"_blank\" rel=\"noopener noreferrer\">Oracle Database Tutorials for Beginners ( Junior Oracle DBA )<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I got &#8221; RMAN-06571: datafile 1 does not have recoverable copy\u00a0&#8221; error in Oracle database during restore database.<\/p>\n","protected":false},"author":1,"featured_media":3446,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2111],"tags":[16145,16148,16147,16146,16144],"class_list":["post-32505","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-ora-errors","tag-datafile-1-does-not-have-recoverable-copy","tag-datafile-does-not-have-recoverable-copy","tag-rman-6571","tag-rman-06571","tag-rman-06571-datafile-1-does-not-have-recoverable-copy"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/ittutorial.org\/wp-content\/uploads\/2013\/10\/oracle-rman.jpg","jetpack_sharing_enabled":true,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/32505","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/comments?post=32505"}],"version-history":[{"count":1,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/32505\/revisions"}],"predecessor-version":[{"id":32506,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/posts\/32505\/revisions\/32506"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/media\/3446"}],"wp:attachment":[{"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/media?parent=32505"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/categories?post=32505"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ittutorial.org\/wp-json\/wp\/v2\/tags?post=32505"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}