{"id":12268,"date":"2019-02-21T08:05:50","date_gmt":"2019-02-21T07:05:50","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\/"},"modified":"2019-02-21T08:05:50","modified_gmt":"2019-02-21T07:05:50","slug":"create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\/","title":{"rendered":"Create a primary database using the backup of a standby database on 12cR2"},"content":{"rendered":"<p>The scope of this blog will be to show how to create a primary role database based on a backup of a standby database on 12cR2.<\/p>\n<p><strong>Step1: We are assuming that an auxiliary instance has been created and started in nomount mode.<\/strong><\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">rman target \/\nrestore primary controlfile from 'backup_location_directory\/control_.bkp';\nexit;\n\n<\/pre>\n<p>By specifying &#8220;restore primary&#8221; , will modify the flag into the controlfile, and will mount a primary role instance instead of a standby one.<\/p>\n<p><strong>Step2: Once mounted the instance, we will restore the backup of the standby database.<\/strong><\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">run\n{\ncatalog start with 'backup_location_directory';\nrestore database;\nalter database flashback off;\nrecover database \n}\n<\/pre>\n<p>If in the pfile used to start the instance, you specified the recovery destination and size parameters it will try to enable the flashback.<br \/>\nThe flashback enable , before during the recovery is not allowed, so we will deactivate for the moment.<\/p>\n<p><strong>Step3: Restore\/recover completed successfully, we will try to open the database, but got some errors: <\/strong><\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">alter database open :\n\nORA-03113: end-of-file on communication channel\nProcess ID: 2588\nSession ID: 1705 Serial number: 5<\/pre>\n<p><strong>Step4: Fix the errors and try to open the database:<\/strong><\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">--normal redo log groups\nalter database clear unarchived logfile group YYY;\n\n--standby redo log groups\nalter database clear unarchived logfile group ZZZ;\nalter database drop logfile group ZZZ;\n<\/pre>\n<p>Is not enough. Looking on the database alert log file we can see :<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">LGWR: Primary database is in MAXIMUM AVAILABILITY mode \nLGWR: Destination LOG_ARCHIVE_DEST_2 is not serviced by LGWR \nLGWR: Destination LOG_ARCHIVE_DEST_1 is not serviced by LGWR \n\nErrors in file \/&lt;TRACE_DESTINATION&gt;_lgwr_1827.trc: \nORA-16072: a minimum of one standby database destination is required \nLGWR: terminating instance due to error 16072 \nInstance terminated by LGWR, pid = 1827<\/pre>\n<p><strong>Step5: Complete the opening procedure:<\/strong><\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">alter system set log_archive_dest_1='LOCATION=USE_DB_RECOVERY_FILE_DEST';\nalter database set standby database to maximize performance;\n\nSQL&gt; select name,open_mode,protection_mode from v$database;\n\nNAME      OPEN_MODE            PROTECTION_MODE\n--------- -------------------- --------------------\nNAME      MOUNTED              MAXIMUM PERFORMANCE\n\nSQL&gt; alter database flashback on;\n\nDatabase altered.\n\nSQL&gt; alter database open;\n\nDatabase altered.\n\nSQL&gt; select name,db_unique_name,database_role from v$database;\n\nNAME      DB_UNIQUE_NAME                 DATABASE_ROLE\n--------- ------------------------------ ----------------\nNAME      NAME_UNIQUE                    PRIMARY<\/pre>\n<pre class=\"brush: sql; gutter: true; first-line: 1\"><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>The scope of this blog will be to show how to create a primary role database based on a backup of a standby database on 12cR2. Step1: We are assuming that an auxiliary instance has been created and started in nomount mode. rman target \/ restore primary controlfile from &#8216;backup_location_directory\/control_.bkp&#8217;; exit; By specifying &#8220;restore primary&#8221;&hellip;&nbsp;<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[4133,59],"tags":[297,135,221,23,84,349,209,1025],"class_list":["post-12268","post","type-post","status-publish","format-standard","category-database","category-oracle","tag-availability-groups","tag-cloud","tag-data-guard","tag-dba","tag-high-availability","tag-optimizer","tag-oracle-12c","tag-oracle-12cr2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.9 (Yoast SEO v28.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Create a primary database using the backup of a standby database on 12cR2 - dbi services Blog<\/title>\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\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Create a primary database using the backup of a standby database on 12cR2\" \/>\n<meta property=\"og:description\" content=\"The scope of this blog will be to show how to create a primary role database based on a backup of a standby database on 12cR2. Step1: We are assuming that an auxiliary instance has been created and started in nomount mode. rman target \/ restore primary controlfile from &#039;backup_location_directory\/control_.bkp&#039;; exit; By specifying &#8220;restore primary&#8221;&hellip;&nbsp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi services Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dbiservices\/\" \/>\n<meta property=\"article:published_time\" content=\"2019-02-21T07:05:50+00:00\" \/>\n<meta name=\"author\" content=\"Oracle Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:site\" content=\"@dbiservices\" \/>\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=\"2 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\\\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\\\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/bf7c7eb0bec165183207237c9d0ee1d5\"},\"headline\":\"Create a primary database using the backup of a standby database on 12cR2\",\"datePublished\":\"2019-02-21T07:05:50+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\\\/\"},\"wordCount\":177,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"keywords\":[\"Availability groups\",\"Cloud\",\"Data Guard\",\"DBA\",\"High Availability\",\"Optimizer\",\"Oracle 12c\",\"Oracle 12cR2\"],\"articleSection\":[\"Database\",\"Oracle\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\\\/\",\"name\":\"Create a primary database using the backup of a standby database on 12cR2 - dbi services Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2019-02-21T07:05:50+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a primary database using the backup of a standby database on 12cR2\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi services Blog\",\"description\":\"#BeSharing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"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\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\",\"name\":\"dbi services\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"width\":512,\"height\":512,\"caption\":\"dbi services\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dbiservices\\\/\",\"https:\\\/\\\/x.com\\\/dbiservices\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dbi-services\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/dbiservices\"],\"description\":\"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.\",\"email\":\"info@dbi-services.com\",\"telephone\":\"+41 32 422 96 00\",\"legalName\":\"dbi services SA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/bf7c7eb0bec165183207237c9d0ee1d5\",\"name\":\"Oracle Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/oracle-square.png\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/oracle-square.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/12\\\/oracle-square.png\",\"caption\":\"Oracle Team\"},\"description\":\"Posts published under the Oracle Team account are collective contributions by the dbi services Oracle consultants. The practice covers the full Oracle Database lifecycle: architecture, migration and upgrade, high availability with RAC and Data Guard, backup and recovery, performance tuning, and engineered systems such as Oracle Database Appliance and Exadata. The team holds Oracle certifications up to Certified Master level and operates customer platforms under service level agreements.\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/oracle-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Create a primary database using the backup of a standby database on 12cR2 - dbi services Blog","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\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\/","og_locale":"en_US","og_type":"article","og_title":"Create a primary database using the backup of a standby database on 12cR2","og_description":"The scope of this blog will be to show how to create a primary role database based on a backup of a standby database on 12cR2. Step1: We are assuming that an auxiliary instance has been created and started in nomount mode. rman target \/ restore primary controlfile from 'backup_location_directory\/control_.bkp'; exit; By specifying &#8220;restore primary&#8221;&hellip;&nbsp;","og_url":"https:\/\/www.dbi-services.com\/blog\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\/","og_site_name":"dbi services Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2019-02-21T07:05:50+00:00","author":"Oracle Team","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","twitter_misc":{"Written by":"Oracle Team","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bf7c7eb0bec165183207237c9d0ee1d5"},"headline":"Create a primary database using the backup of a standby database on 12cR2","datePublished":"2019-02-21T07:05:50+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\/"},"wordCount":177,"commentCount":1,"publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"keywords":["Availability groups","Cloud","Data Guard","DBA","High Availability","Optimizer","Oracle 12c","Oracle 12cR2"],"articleSection":["Database","Oracle"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\/","url":"https:\/\/www.dbi-services.com\/blog\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\/","name":"Create a primary database using the backup of a standby database on 12cR2 - dbi services Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2019-02-21T07:05:50+00:00","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/create-a-primary-database-using-the-backup-of-a-standby-database-on-12cr2\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Create a primary database using the backup of a standby database on 12cR2"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi services Blog","description":"#BeSharing","publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"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":"Organization","@id":"https:\/\/www.dbi-services.com\/#organization","name":"dbi services","url":"https:\/\/www.dbi-services.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","width":512,"height":512,"caption":"dbi services"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dbiservices\/","https:\/\/x.com\/dbiservices","https:\/\/www.linkedin.com\/company\/dbi-services\/","https:\/\/www.youtube.com\/user\/dbiservices"],"description":"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.","email":"info@dbi-services.com","telephone":"+41 32 422 96 00","legalName":"dbi services SA"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bf7c7eb0bec165183207237c9d0ee1d5","name":"Oracle Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/12\/oracle-square.png","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/12\/oracle-square.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/12\/oracle-square.png","caption":"Oracle Team"},"description":"Posts published under the Oracle Team account are collective contributions by the dbi services Oracle consultants. The practice covers the full Oracle Database lifecycle: architecture, migration and upgrade, high availability with RAC and Data Guard, backup and recovery, performance tuning, and engineered systems such as Oracle Database Appliance and Exadata. The team holds Oracle certifications up to Certified Master level and operates customer platforms under service level agreements.","url":"https:\/\/www.dbi-services.com\/blog\/author\/oracle-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/12268","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=12268"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/12268\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=12268"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=12268"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=12268"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}