{"id":5420,"date":"2013-04-15T15:46:13","date_gmt":"2013-04-15T19:46:13","guid":{"rendered":"http:\/\/onlineappsdba.com\/?p=5420"},"modified":"2013-04-15T15:46:13","modified_gmt":"2013-04-15T19:46:13","slug":"rman-backup-failure-after-database-is-registered-with-catalog-rman-06004rman-20004","status":"publish","type":"post","link":"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/15\/rman-backup-failure-after-database-is-registered-with-catalog-rman-06004rman-20004\/","title":{"rendered":"RMAN Backup Failure after Database is registered with Catalog :RMAN-06004,RMAN-20004"},"content":{"rendered":"<p>Recently, I came across an interesting scenario\u00a0related\u00a0to RMAN. We registered a New database , say STD to catalog and scheduled RMAN backup of that database using GRID 11g. When executed RMAN backup job, it failed with below error (in execution log):<br \/>\n<strong><br \/>\nRMAN-06004: ORACLE error from recovery catalog database: RMAN-20004: target database name does not match name in recovery catalog<\/strong><\/p>\n<p>RMAN-00571: ===========================================================<br \/>\nRMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============<br \/>\nRMAN-00571: ===========================================================<br \/>\n<strong>RMAN-03002: failure of backup command at 04\/13\/2013 19:10:53<br \/>\nRMAN-03014: implicit resync of recovery catalog failed<br \/>\nRMAN-06004: ORACLE error from recovery catalog database: RMAN-20004: target database name does not match name in recovery catalog<\/strong><\/p>\n<p>Opened putty session for Database host<br \/>\nSet the database environment.<\/p>\n<p>Executed:<br \/>\n<em>rman target \/ catalog catalog_user\/password@catalog_tns<\/em><\/p>\n<p>Recovery Manager: Release 11.2.0.3.0 &#8211; Production on Sat Apr 13 20:30:51 2013<\/p>\n<p>Copyright (c) 1982, 2011, Oracle and\/or its affiliates. All rights reserved.<\/p>\n<p>connected to target database: <strong>STD (DBID=3149054025)<\/strong><br \/>\nconnected to recovery catalog database<\/p>\n<p>RMAN&gt; list incarnation;<\/p>\n<p>List of Database Incarnations<br \/>\nDB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time<br \/>\n&#8212;&#8212;- &#8212;&#8212;- &#8212;&#8212;&#8211; &#8212;&#8212;&#8212;&#8212;&#8212;- &#8212; &#8212;&#8212;&#8212;- &#8212;&#8212;&#8212;-<br \/>\n1241980 1241998 PLMQDBT 33752017 PARENT 1 16-FEB-06<br \/>\n1241980 1241981 PLMQDBT 33752017 CURRENT 565658 03-JUN-09<br \/>\n181806 181813 HYPERPRD 37907210 PARENT 1 09-FEB-04<br \/>\n181806 181807 HYPERPRD 37907210 CURRENT 336500 17-NOV-06<br \/>\n24192179 24192292 <strong>TST3 3149054025<\/strong> PARENT 92602138 24-SEP-10<br \/>\n24192179 24192180 <strong>TST3 3149054025<\/strong> PARENT 112669199319 19-APR-11<br \/>\n24192179 24248819 <strong>TST3 3149054025<\/strong> CURRENT 5977649872563 14-SEP-12<\/p>\n<p>RMAN&gt;<\/p>\n<p>Shockingly STD database was not there in the &#8220;List Incarnations&#8221; output \u00a0and for same DBID we can see there was another database registered in catalog.<br \/>\nBut When we had registered this STD db with catalog, \u00a0it didn\u2019t throw any error. Although the registration seemed successful, it wasn\u2019t successful as the STD is not listed in List Incarnation output.<br \/>\nTo make sure, Connected to catalog DB<\/p>\n<p>SQL&gt; select NAME from rc_database where DBID=3149054025;<\/p>\n<p>NAME<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nTST3<\/p>\n<p>TST3 was a clone of STD. We use RMAN Duplicate to clone databases.<\/p>\n<p><strong>As part of the duplicating operation, RMAN automates the following steps:<\/strong><br \/>\n\u2022 Creates a control file for the duplicate database<br \/>\n\u2022 Restores the target datafiles to the duplicate database and performs incomplete recovery by using all available incremental backups and archived redo logs<br \/>\n\u2022 Shuts down and starts the auxiliary instance .<br \/>\n\u2022 Opens the duplicate database with the RESETLOGS option after incomplete recovery to create the online redo logs (except when running DUPLICATE &#8230;FOR STANDBY, in which case RMAN does not open the database)<br \/>\n\u2022<strong> Generates a new, unique DBID for the duplicate database <\/strong>(except when you create a standby database with DUPLICATE &#8230; FOR STANDBY, in which case RMAN does not create a unique DBID)<\/p>\n<p><strong>So what went wrong?<\/strong><br \/>\nApparently, RMAN Duplicate didn\u2019t complete when Instance was cloned and Database was restored and recovered manually. And DBA forgot to run nid and dbid remained same for source and target.<\/p>\n<p><strong>Resolution<\/strong><br \/>\nTo resolve, we \u00a0un-registered the both databases with that DBID, re-register STD to catalog. Changed DBID for the second database TST3 \u00a0with the NID utility and then registered it into catalog.<br \/>\nHow to Change the DBID and the DBNAME by using NID [ID 224266.1]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently, I came across an interesting scenario\u00a0related\u00a0to RMAN. We registered a New database , say STD to catalog and scheduled [&hellip;]<\/p>\n","protected":false},"author":115,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[424],"tags":[381,382,383,380],"class_list":["post-5420","post","type-post","status-publish","format-standard","hentry","category-database","tag-backup-2","tag-dbid","tag-nid","tag-rman"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>RMAN Backup Failure after Database is registered with Catalog :RMAN-06004,RMAN-20004 -<\/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:\/\/onlineappsdba.com\/index.php\/2013\/04\/15\/rman-backup-failure-after-database-is-registered-with-catalog-rman-06004rman-20004\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"RMAN Backup Failure after Database is registered with Catalog :RMAN-06004,RMAN-20004 -\" \/>\n<meta property=\"og:description\" content=\"Recently, I came across an interesting scenario\u00a0related\u00a0to RMAN. We registered a New database , say STD to catalog and scheduled [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/15\/rman-backup-failure-after-database-is-registered-with-catalog-rman-06004rman-20004\/\" \/>\n<meta property=\"article:published_time\" content=\"2013-04-15T19:46:13+00:00\" \/>\n<meta name=\"author\" content=\"Masroof Ahmad\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Masroof Ahmad\" \/>\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\":\"WebPage\",\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/15\/rman-backup-failure-after-database-is-registered-with-catalog-rman-06004rman-20004\/\",\"url\":\"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/15\/rman-backup-failure-after-database-is-registered-with-catalog-rman-06004rman-20004\/\",\"name\":\"RMAN Backup Failure after Database is registered with Catalog :RMAN-06004,RMAN-20004 -\",\"isPartOf\":{\"@id\":\"https:\/\/onlineappsdba.com\/#website\"},\"datePublished\":\"2013-04-15T19:46:13+00:00\",\"author\":{\"@id\":\"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb\"},\"breadcrumb\":{\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/15\/rman-backup-failure-after-database-is-registered-with-catalog-rman-06004rman-20004\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/15\/rman-backup-failure-after-database-is-registered-with-catalog-rman-06004rman-20004\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/15\/rman-backup-failure-after-database-is-registered-with-catalog-rman-06004rman-20004\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/onlineappsdba.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"RMAN Backup Failure after Database is registered with Catalog :RMAN-06004,RMAN-20004\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/onlineappsdba.com\/#website\",\"url\":\"https:\/\/onlineappsdba.com\/\",\"name\":\"\",\"description\":\"Oracle Implementation &amp; Training Experts\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/onlineappsdba.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb\",\"name\":\"Masroof Ahmad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/onlineappsdba.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g\",\"caption\":\"Masroof Ahmad\"},\"url\":\"https:\/\/onlineappsdba.com\/index.php\/author\/masroof\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"RMAN Backup Failure after Database is registered with Catalog :RMAN-06004,RMAN-20004 -","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:\/\/onlineappsdba.com\/index.php\/2013\/04\/15\/rman-backup-failure-after-database-is-registered-with-catalog-rman-06004rman-20004\/","og_locale":"en_US","og_type":"article","og_title":"RMAN Backup Failure after Database is registered with Catalog :RMAN-06004,RMAN-20004 -","og_description":"Recently, I came across an interesting scenario\u00a0related\u00a0to RMAN. We registered a New database , say STD to catalog and scheduled [&hellip;]","og_url":"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/15\/rman-backup-failure-after-database-is-registered-with-catalog-rman-06004rman-20004\/","article_published_time":"2013-04-15T19:46:13+00:00","author":"Masroof Ahmad","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Masroof Ahmad","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/15\/rman-backup-failure-after-database-is-registered-with-catalog-rman-06004rman-20004\/","url":"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/15\/rman-backup-failure-after-database-is-registered-with-catalog-rman-06004rman-20004\/","name":"RMAN Backup Failure after Database is registered with Catalog :RMAN-06004,RMAN-20004 -","isPartOf":{"@id":"https:\/\/onlineappsdba.com\/#website"},"datePublished":"2013-04-15T19:46:13+00:00","author":{"@id":"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb"},"breadcrumb":{"@id":"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/15\/rman-backup-failure-after-database-is-registered-with-catalog-rman-06004rman-20004\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/onlineappsdba.com\/index.php\/2013\/04\/15\/rman-backup-failure-after-database-is-registered-with-catalog-rman-06004rman-20004\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/onlineappsdba.com\/index.php\/2013\/04\/15\/rman-backup-failure-after-database-is-registered-with-catalog-rman-06004rman-20004\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/onlineappsdba.com\/"},{"@type":"ListItem","position":2,"name":"RMAN Backup Failure after Database is registered with Catalog :RMAN-06004,RMAN-20004"}]},{"@type":"WebSite","@id":"https:\/\/onlineappsdba.com\/#website","url":"https:\/\/onlineappsdba.com\/","name":"","description":"Oracle Implementation &amp; Training Experts","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/onlineappsdba.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/onlineappsdba.com\/#\/schema\/person\/909a876ed58d400faf82caf81d61bfdb","name":"Masroof Ahmad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/onlineappsdba.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/10f9db7bdbbd7f9ccfbe9b2d208e5978fc28315e9c704383e639a926ea0fce5f?s=96&d=mm&r=g","caption":"Masroof Ahmad"},"url":"https:\/\/onlineappsdba.com\/index.php\/author\/masroof\/"}]}},"_links":{"self":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/posts\/5420","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/users\/115"}],"replies":[{"embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/comments?post=5420"}],"version-history":[{"count":0,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/posts\/5420\/revisions"}],"wp:attachment":[{"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/media?parent=5420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/categories?post=5420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/onlineappsdba.com\/index.php\/wp-json\/wp\/v2\/tags?post=5420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}