{"id":11454,"date":"2018-07-18T07:34:04","date_gmt":"2018-07-18T05:34:04","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/control-file-issues-on-duplicating-with-non-patched-oracle-version\/"},"modified":"2018-07-18T07:34:04","modified_gmt":"2018-07-18T05:34:04","slug":"control-file-issues-on-duplicating-with-non-patched-oracle-version","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/control-file-issues-on-duplicating-with-non-patched-oracle-version\/","title":{"rendered":"Control File issues on duplicating  with non patched Oracle version."},"content":{"rendered":"<p><strong>Introduction<\/strong> :<\/p>\n<p>RMAN has the ability to duplicate, or clone, a database from a backup or from an active database.<br \/>\nIt is possible to create a duplicate database on a remote server with the same file structure,<br \/>\nor on a remote server with a different file structure or on the local server with a different file structure.<br \/>\nFor some old and\u00a0 non patched Oracle versions such as that earlier than 11.2.0.4 , the duplicate (from active or backup) can be a real<br \/>\nchallenge even for those DBAs with years of experience,\u00a0 due to different bugs encountered.<\/p>\n<p>The scenario specified\u00a0 below will focus on control file issues revealed by duplication from active database an Oracle 11.2.0.2 version EE.<\/p>\n<p>&lt;INFO&gt;Make sure to use nohup command line-utility which allows to run command\/process or shell script.<\/p>\n<p><strong>Demonstration<\/strong> :<\/p>\n<p><strong>Step1: <\/strong>Prepare your script:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">vi script_duplicate.ksh\n\n#!\/bin\/ksh\nexport ORACLE_HOME=$ORACLE_HOME\nexport PATH=$PATH1:$ORACLE_HOME\/bin\nrman target sys\/pwd@TNS_NAME_TARGET auxiliary sys\/pwd@TNS_NAME_AUXILIARY log=duplicate.log cmdfile=\/home\/oracle\/rman_bkup.cmd\n\nvi rman_bkup.cmd\nrun\n{\nallocate channel ch1 device type disk;\nallocate channel ch2 device type disk;\nallocate channel ch3 device type disk;\nallocate auxiliary channel dh1 device type disk;\nallocate auxiliary channel dh2 device type disk;\nallocate auxiliary channel dh3 device type disk;\nduplicate target database to &lt;AUXILIARY_NAME&gt; from active database nofilenamecheck;\nrelease channel ch3;\nrelease channel ch2;\nrelease channel ch1;\n}\n\nand launch like that : nohup .\/script_duplicate.ksh &amp;\n<\/pre>\n<p><strong>Step2<\/strong>: Check instance parameters.<br \/>\nDepending on the PSU level of your instance, even before starting the duplicate, can fail with this error.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">RMAN-00571: ===================================================\nRMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS\nRMAN-00571: ===================================================\nRMAN-03002: failure of Duplicate Db command at 11\/02\/2011 06:05:48\nRMAN-04014: startup failed: ORA-00600: internal error code, arguments: [kck_rls_check must use (11,0,0,0,0) or lower], [kdt.c], [9576], [11.2.0.2.0], [], [], [], [], [], [], [], []\nRMAN-04017: startup error description: ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance\nRMAN-03015: error occurred in stored script Memory Script\nRMAN-04014: startup failed: ORA-00600: internal error code, arguments: [kck_rls_check must use (11,0,0,0,0) or lower], [kdt.c], [9576], [11.2.0.2.0], [], [], [], [], [], [], [], []\nRMAN-04017: startup error description: ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance<\/pre>\n<p>According with Oracle Support note : <strong>1064264.1<\/strong><\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">1. Edit the pfile, add parameter:\n_compression_compatibility= \"11.2.0\"\n\n2. Restart the instance using the pfile\nSQL&gt; startup pfile='&lt;fullpath name of pfile&gt;'\n\n3. Create the SPFILE again\nSQL&gt; create spfile from pfile;\n\n4. Restart the instance with the SPFILE\nSQLl&gt; shutdown immediate;\nSQL&gt; startup\n\nand relaunch the previous command (Step 1).\n<\/pre>\n<p><strong>Step3<\/strong> : Control file issue, trying to open the database.<br \/>\nAfter transferring the datafiles , your duplicate will crash with these errors , trying to open the database.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">RMAN-00571: ===========================================================\nRMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============\nRMAN-00571: ===========================================================\nRMAN-03002: failure of Duplicate Db command at 15\/07\/2018 17:39:30\nRMAN-05501: aborting duplication of target database\nRMAN-03015: error occurred in stored script Memory Script\n\n\n\nSQL&gt; alter database open resetlogs;\nalter database open resetlogs\n*\nERROR at line 1:\nORA-19838: Cannot use this control file to open database<\/pre>\n<p>Basically is because of a known bug (Bug <strong>11063122<\/strong> in 11gr2).<br \/>\nControlfile created during the duplicate in 11gr2 will store redolog file locations as of primary.<br \/>\nWe need to recreate control file changing the locations of redo logfiles and datafiles and open database with resetlogs.<br \/>\nIn the controlfile recreation script the database name is the source &lt;db_name&gt; and the directory names for redo logs are still pointing to the source database .<\/p>\n<p>The workaround is :<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">1. Backup as trace your control file (cloned DB)\n\nsql&gt; alter database backup controlfile to trace ;\n\n2. Open the file  , and extract the section RESETLOGS, to modify like that :\n\nCREATE CONTROLFILE REUSE DATABASE \"&lt;src_db_name&gt;\" RESETLOGS  ARCHIVELOG\n    MAXLOGFILES 16\n    MAXLOGMEMBERS 3\n    MAXDATAFILES 100\n    MAXINSTANCES 8\n    MAXLOGHISTORY 11680\nLOGFILE\n  GROUP 9  '&lt;path_of_the_cloned_DB&gt;redo09.log'  SIZE 150M BLOCKSIZE 512,\n  GROUP 10 '&lt;path_of_the_cloned_DB&gt;\/redo10.log'  SIZE 150M BLOCKSIZE 512,\n  GROUP 11 '&lt;path_of_the_cloned_DB&gt;\/redo11.log'  SIZE 150M BLOCKSIZE 512,\n\nDATAFILE\n  '&lt;path_of_the_cloned_DB&gt;\/system01.dbf',\n  '&lt;path_of_the_cloned_DB&gt;\/undotbs01.dbf',\n  '&lt;path_of_the_cloned_DB&gt;\/sysaux01.dbf',\n  '&lt;path_of_the_cloned_DB&gt;\/users01.dbf',\n-------------more datafiles\nCHARACTER SET EE8ISO8859P2;\n\nSave as trace_control.ctl\n\n3. SQL&gt; alter system set db_name=&lt;new db_name&gt; scope=spfile;\n4. SQL&gt; startup nomount\n5. SQL&gt;@trace_control.ctl\n      --control file created and multiplexed in all the destinations mentioned on your spfile \n6. SQL&gt; alter database open resetlogs<\/pre>\n<p>&lt;INFO&gt;If your source db had activity during the duplicate process you should apply manually some required archivelogs.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">RMAN-00571: ===========================================================\nRMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============\nRMAN-00571: ===========================================================\nRMAN-03002: failure of alter db command at 15\/07\/2018 19:21:30\nORA-01152: file 1 was not restored from a sufficiently old backup\nORA-01110: data file 1: '\/u01\/oradata\/DBName\/system01.dbf'<\/pre>\n<p>Search on source database , for those\u00a0 archivelogs with sequence# greater or equal to <strong>399747<\/strong> and apply them manually on the target DB.<\/p>\n<p>If somehow those are not available you need to take an incremental backup to roll forward your cloned database.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">7. SQL&gt; recover database using backup controlfile;\n\nORA-00279: change 47260162325 generated at  15\/07\/2018 19:27:40 needed for thread 1\nORA-00289: suggestion : &lt;path&gt;o1_mf_1_399747_%u_.arc\nORA-00280: change 47260162325 for thread 1 is in sequence #399747\n\nOnce the required archivelogs files have been applied , try again to open your database:\n\nRMAN&gt; alter database open resetlogs;\n\ndatabase opened\n\nRMAN&gt; exit<\/pre>\n<p><strong>Conclusion <\/strong>:<br \/>\nIf you&#8217;re the kind of Oracle administrator who has the power to approve or deny, you must know how dangerous it is to run your applications with\u00a0 non patched Oracle databases.<br \/>\nYour data within your organization is better protected if your are taking advantage of patches issued by Oracle and running your production data against supported Oracle versions only.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction : RMAN has the ability to duplicate, or clone, a database from a backup or from an active database. It is possible to create a duplicate database on a remote server with the same file structure, or on a remote server with a different file structure or on the local server with a different [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229,59],"tags":[280,23,17],"type_dbi":[],"class_list":["post-11454","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","category-oracle","tag-database","tag-dba","tag-oracle-11g"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Control File issues on duplicating with non patched Oracle version. - dbi Blog<\/title>\n<meta name=\"description\" content=\"Blog about the issues encountered with control file on an duplicate from active database using Oracle 11.2.0.2.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/control-file-issues-on-duplicating-with-non-patched-oracle-version\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Control File issues on duplicating with non patched Oracle version.\" \/>\n<meta property=\"og:description\" content=\"Blog about the issues encountered with control file on an duplicate from active database using Oracle 11.2.0.2.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/control-file-issues-on-duplicating-with-non-patched-oracle-version\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-18T05:34:04+00:00\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Oracle Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/control-file-issues-on-duplicating-with-non-patched-oracle-version\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/control-file-issues-on-duplicating-with-non-patched-oracle-version\\\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/66ab87129f2d357f09971bc7936a77ee\"},\"headline\":\"Control File issues on duplicating with non patched Oracle version.\",\"datePublished\":\"2018-07-18T05:34:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/control-file-issues-on-duplicating-with-non-patched-oracle-version\\\/\"},\"wordCount\":396,\"commentCount\":0,\"keywords\":[\"database\",\"DBA\",\"Oracle 11g\"],\"articleSection\":[\"Database Administration &amp; Monitoring\",\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/control-file-issues-on-duplicating-with-non-patched-oracle-version\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/control-file-issues-on-duplicating-with-non-patched-oracle-version\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/control-file-issues-on-duplicating-with-non-patched-oracle-version\\\/\",\"name\":\"Control File issues on duplicating with non patched Oracle version. - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2018-07-18T05:34:04+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/66ab87129f2d357f09971bc7936a77ee\"},\"description\":\"Blog about the issues encountered with control file on an duplicate from active database using Oracle 11.2.0.2.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/control-file-issues-on-duplicating-with-non-patched-oracle-version\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/control-file-issues-on-duplicating-with-non-patched-oracle-version\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/control-file-issues-on-duplicating-with-non-patched-oracle-version\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Control File issues on duplicating with non patched Oracle version.\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/66ab87129f2d357f09971bc7936a77ee\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g\",\"caption\":\"Oracle Team\"},\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/oracle-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Control File issues on duplicating with non patched Oracle version. - dbi Blog","description":"Blog about the issues encountered with control file on an duplicate from active database using Oracle 11.2.0.2.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/control-file-issues-on-duplicating-with-non-patched-oracle-version\/","og_locale":"en_US","og_type":"article","og_title":"Control File issues on duplicating with non patched Oracle version.","og_description":"Blog about the issues encountered with control file on an duplicate from active database using Oracle 11.2.0.2.","og_url":"https:\/\/www.dbi-services.com\/blog\/control-file-issues-on-duplicating-with-non-patched-oracle-version\/","og_site_name":"dbi Blog","article_published_time":"2018-07-18T05:34:04+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/control-file-issues-on-duplicating-with-non-patched-oracle-version\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/control-file-issues-on-duplicating-with-non-patched-oracle-version\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"headline":"Control File issues on duplicating with non patched Oracle version.","datePublished":"2018-07-18T05:34:04+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/control-file-issues-on-duplicating-with-non-patched-oracle-version\/"},"wordCount":396,"commentCount":0,"keywords":["database","DBA","Oracle 11g"],"articleSection":["Database Administration &amp; Monitoring","Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/control-file-issues-on-duplicating-with-non-patched-oracle-version\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/control-file-issues-on-duplicating-with-non-patched-oracle-version\/","url":"https:\/\/www.dbi-services.com\/blog\/control-file-issues-on-duplicating-with-non-patched-oracle-version\/","name":"Control File issues on duplicating with non patched Oracle version. - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2018-07-18T05:34:04+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee"},"description":"Blog about the issues encountered with control file on an duplicate from active database using Oracle 11.2.0.2.","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/control-file-issues-on-duplicating-with-non-patched-oracle-version\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/control-file-issues-on-duplicating-with-non-patched-oracle-version\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/control-file-issues-on-duplicating-with-non-patched-oracle-version\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Control File issues on duplicating with non patched Oracle version."}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/66ab87129f2d357f09971bc7936a77ee","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f711f7cd2c9b09bf2627133755b569fb5be0694810cfd33033bdd095fedba86d?s=96&d=mm&r=g","caption":"Oracle Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/11454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=11454"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/11454\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=11454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=11454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=11454"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=11454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}