{"id":917,"date":"2024-06-18T15:33:12","date_gmt":"2024-06-18T13:33:12","guid":{"rendered":"https:\/\/anjo.pt\/keyword-oracle\/?p=917"},"modified":"2024-06-07T15:36:32","modified_gmt":"2024-06-07T13:36:32","slug":"the-dbt-16051-when-creating-a-standby-database-using-dbca-is-still-around-7-years-after","status":"publish","type":"post","link":"https:\/\/anjo.pt\/keyword-oracle\/2024\/06\/18\/the-dbt-16051-when-creating-a-standby-database-using-dbca-is-still-around-7-years-after\/","title":{"rendered":"The DBT-16051 when creating a standby database using DBCA is still around. 7 years after."},"content":{"rendered":"\n<p>Sometimes I ask myself why some bugs are not solved. When looking for DBT-16071 we find a blog post from Frank Pachot from more than 7 years ago. He shows that with Oracle 12.2 you can &#8220;create&#8221; standby databases directly with dbca. But that the script does only a duplicate for standby and nothing more.<\/p>\n\n\n\n<p>I decided to try with 19.22 to see how the situation evolved. It didn&#8217;t. <\/p>\n\n\n\n<p>The first thing I got was a DBT-16051 error:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$ dbca -createDuplicateDB -gdbName anjodb01 -primaryDBConnectionString &quot;anjovm01.local.wsl\/anjodb01_s1.local.wsl&quot; -sid anjodb01 -createAsStandby -dbUniqueName anjodb01_s2 -silent\nEnter SYS user password:\n*****\n&#x5B;FATAL] &#x5B;DBT-16051] Archive log mode is not enabled in the primary database.\n   ACTION: Primary database should be configured with archive log mode for creating a duplicate or standby database.\n\n<\/pre><\/div>\n\n\n<p>Quick check shows the primary is correctly in archivelog mode. The problem is the Easy Connect string. The string I gave &#8220;anjovm1.local.wsl\/anjodb1_s1.local.wsl&#8221; works well on sqlplus, but not with dbca. There you need to specify the port, also when you are just using the default one:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$ dbca -createDuplicateDB -gdbName anjodb01 -primaryDBConnectionString &quot;anjovm01.local.wsl:1521\/anjodb01_s1.local.wsl&quot; -sid anjodb01 -createAsStandby -dbUniqueName anjodb01_s2 -silent\nEnter SYS user password:\n*****\n&#x5B;WARNING] &#x5B;DBT-10331] Specified SID Name (anjodb01) may have a potential conflict with an already existing database on the system.\n   CAUSE: The specified SID Name without the trailing numeric characters ({2}) may have a potential conflict with an already existing database on the system.\n   ACTION: Specify a different SID Name that does not conflict with existing databases on the system.\nPrepare for db operation\n22% complete\nListener config step\n44% complete\nAuxiliary instance creation\n67% complete\nRMAN duplicate\n89% complete\nPost duplicate database operations\n100% complete\n<\/pre><\/div>\n\n\n<p>The warning DBT-10331 appears because I&#8217;ve a &#8220;anjodb02&#8221; in the same VM, and this could create a problem, as they share the prefix &#8220;anjodb&#8221;. I don&#8217;t expect on a single instance environment that to be a problem though.<\/p>\n\n\n\n<p>And it starts the new standby in &#8216;read only&#8217; mode, which requires adequate licenses. <\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nSQL&gt; select name, db_unique_name, database_role, open_mode, dataguard_broker from v$database;\n\nNAME      DB_UNIQUE_NAME                 DATABASE_ROLE    OPEN_MODE            DATAGUAR\n--------- ------------------------------ ---------------- -------------------- --------\nANJODB01 ANJODB02_S2                  PHYSICAL STANDBY READ ONLY            DISABLED\n<\/pre><\/div>\n\n\n<p>For the moment, I&#8217;ll stay with my set of scripts which do the operations in the right way.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes I ask myself why some bugs are not solved. When looking for DBT-16071 we find a blog post from Frank Pachot from more than 7 years ago. He shows that with Oracle 12.2 you can &#8220;create&#8221; standby databases directly with dbca. But that the script does only a duplicate for standby and nothing more. [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,6,39],"tags":[],"class_list":{"0":"post-917","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-dataguard","7":"category-oracle","8":"category-oracle-19c","9":"czr-hentry"},"_links":{"self":[{"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/posts\/917","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/comments?post=917"}],"version-history":[{"count":2,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/posts\/917\/revisions"}],"predecessor-version":[{"id":919,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/posts\/917\/revisions\/919"}],"wp:attachment":[{"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/media?parent=917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/categories?post=917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/anjo.pt\/keyword-oracle\/wp-json\/wp\/v2\/tags?post=917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}