{"id":9644,"date":"2017-01-04T12:48:41","date_gmt":"2017-01-04T11:48:41","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\/"},"modified":"2017-01-04T12:48:41","modified_gmt":"2017-01-04T11:48:41","slug":"oracle-12cr2-dataguard-switchover-with-oracle-wallets","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\/","title":{"rendered":"Oracle 12cR2 &#8211; DataGuard Switchover with Oracle Wallets"},"content":{"rendered":"<h2>By William Sescu<\/h2>\n<p>I would like to make my DataGuard environment more secure, by eliminating the typing of &#8220;connect sys\/Manager1&#8221; for my DGMGRL commands. Especially the ones, that I have in my scripts. For example:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">oracle@dbidg01:\/home\/oracle\/ [DBIT122] dgmgrl &lt;&lt;-EOF\n&gt; connect sys\/Manager1\n&gt; show configuration verbose;\n&gt; EOF<\/pre>\n<p>or something like that:<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">oracle@dbidg01:\/u01\/app\/oracle\/local\/dg\/ [DBIT122] cat show_config.dg\nconnect sys\/Manager1;\nshow configuration;\n\noracle@dbidg01:\/u01\/app\/oracle\/local\/dg\/ [DBIT122] dgmgrl @show_config.dg\nDGMGRL for Linux: Release 12.2.0.1.0 - Production on Wed Jan 4 12:54:11 2017\n\nCopyright (c) 1982, 2016, Oracle and\/or its affiliates.  All rights reserved.\n\nWelcome to DGMGRL, type \"help\" for information.\nConnected to \"DBIT122_SITE1\"\nConnected as SYSDG.\n\nConfiguration - DBIT122\n\n  Protection Mode: MaxAvailability\n  Members:\n  DBIT122_SITE1 - Primary database\n    DBIT122_SITE2 - Physical standby database\n\nFast-Start Failover: DISABLED\n\nConfiguration Status:\nSUCCESS   (status updated 39 seconds ago)<\/pre>\n<p>HINT: Be aware that &#8220;dgmgrl [&lt;options&gt;] @script_file_name&#8221; is a new feature with the Broker in Oracle 12.2. It was not possible to use &#8220;dgmgrl @script&#8221; beforehand.<\/p>\n<p>Ok. So how can I make my scripts more secure? Of course, by using wallets, like we did already with the observer configuration. See\u00a0<a href=\"http:\/\/dbi-services.com\/blog\/oracle-12cr2-how-to-setup-dataguard-observer-with-oracle-wallets\/\">http:\/\/dbi-services.com\/blog\/oracle-12cr2-how-to-setup-dataguard-observer-with-oracle-wallets\/<\/a><br \/>\nHowever, I want to do also the switchover and other operations with wallets.<\/p>\n<p>So, lets create the necessary wallets for the SYS user on the Primary and the Standby.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">-- Primary\n\noracle@dbidg01:\/u01\/app\/oracle\/network\/admin\/ [DBIT122] mkstore -wrl \/u01\/app\/oracle\/admin\/wallets -createCredential DBIT122_SITE1 SYS             \nOracle Secret Store Tool : Version 12.2.0.1.0\nCopyright (c) 2004, 2016, Oracle and\/or its affiliates. All rights reserved.\n\nYour secret\/Password is missing in the command line\nEnter your secret\/Password:\nRe-enter your secret\/Password:\nEnter wallet password:\n\noracle@dbidg01:\/u01\/app\/oracle\/network\/admin\/ [DBIT122] mkstore -wrl \/u01\/app\/oracle\/admin\/wallets -createCredential DBIT122_SITE2 SYS\nOracle Secret Store Tool : Version 12.2.0.1.0\nCopyright (c) 2004, 2016, Oracle and\/or its affiliates. All rights reserved.\n\nYour secret\/Password is missing in the command line\nEnter your secret\/Password:\nRe-enter your secret\/Password:\nEnter wallet password:\n\n-- Standby\n\noracle@dbidg02:\/u01\/app\/oracle\/network\/admin\/ [DBIT122] mkstore -wrl \/u01\/app\/oracle\/admin\/wallets -createCredential DBIT122_SITE1 SYS\nOracle Secret Store Tool : Version 12.2.0.1.0\nCopyright (c) 2004, 2016, Oracle and\/or its affiliates. All rights reserved.\n\nYour secret\/Password is missing in the command line\nEnter your secret\/Password:\nRe-enter your secret\/Password:\nEnter wallet password:\n\noracle@dbidg02:\/u01\/app\/oracle\/network\/admin\/ [DBIT122] mkstore -wrl \/u01\/app\/oracle\/admin\/wallets -createCredential DBIT122_SITE2 SYS\nOracle Secret Store Tool : Version 12.2.0.1.0\nCopyright (c) 2004, 2016, Oracle and\/or its affiliates. All rights reserved.\n\nYour secret\/Password is missing in the command line\nEnter your secret\/Password:\nRe-enter your secret\/Password:\nEnter wallet password:<\/pre>\n<p>And of course, we have to test the connections to see if everything is working correctly.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">-- Primary\nsqlplus \/@DBIT122_SITE1 as sysdba\n\nsqlplus \/@DBIT122_SITE2 as sysdba\n\nDGMGRL&gt; connect \/@DBIT122_SITE1\n\nDGMGRL&gt; connect \/@DBIT122_SITE2\n\n\n-- Standby\n\nsqlplus \/@DBIT122_SITE1 as sysdba\n\nsqlplus \/@DBIT122_SITE2 as sysdba\n\nDGMGRL&gt; connect \/@DBIT122_SITE1\n\nDGMGRL&gt; connect \/@DBIT122_SITE2<\/pre>\n<p>So far, so good. My connections with the wallets work from the Primary to the Standby and the other way around. Now, lets try to do a DataGuard switchover with wallets.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">DGMGRL&gt; connect \/@DBIT122_SITE1\nConnected to \"DBIT122_SITE1\"\nConnected as SYSDBA.\nDGMGRL&gt;\nDGMGRL&gt;\nDGMGRL&gt; show configuration;\n\nConfiguration - DBIT122\n\n  Protection Mode: MaxAvailability\n  Members:\n  DBIT122_SITE1 - Primary database\n    DBIT122_SITE2 - (*) Physical standby database\n\nFast-Start Failover: ENABLED\n\nConfiguration Status:\nSUCCESS   (status updated 58 seconds ago)\n\nDGMGRL&gt; SWITCHOVER TO 'DBIT122_SITE2';\nPerforming switchover NOW, please wait...\nOperation requires a connection to database \"DBIT122_SITE2\"\nConnecting ...\nConnected to \"DBIT122_SITE2\"\nConnected as SYSDBA.\nNew primary database \"DBIT122_SITE2\" is opening...\nOperation requires start up of instance \"DBIT122\" on database \"DBIT122_SITE1\"\nStarting instance \"DBIT122\"...\nORA-01017: invalid username\/password; logon denied\n\nWarning: You are no longer connected to ORACLE.\n\nPlease complete the following steps to finish switchover:\n        start up instance \"DBIT122\" of database \"DBIT122_SITE1\"\n\nDGMGRL&gt;<\/pre>\n<p>Oppsssssss &#8230; doesn&#8217;t look good. It says &#8220;invalid username\/password&#8221;, but everything worked beforehand. Ok. That output does not give me too much information. Lets try the whole thing again with the Debug mode &#8230; dgmgrl -debug<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">oracle@dbidg01:\/u01\/app\/oracle\/network\/admin\/ [DBIT122] dgmgrl -debug\nDGMGRL for Linux: Release 12.2.0.1.0 - Production on Wed Jan 4 11:04:21 2017\n\nCopyright (c) 1982, 2016, Oracle and\/or its affiliates.  All rights reserved.\n\nWelcome to DGMGRL, type \"help\" for information.\nDGMGRL&gt; connect \/@DBIT122_SITE2\n[W000 01\/04 11:04:34.32] Connecting to database using DBIT122_SITE2.\n[W000 01\/04 11:04:34.33] Attempt logon as SYSDG\n[W000 01\/04 11:04:35.42] Attempt logon as SYSDBA\n[W000 01\/04 11:04:35.47] Executing query [select db_unique_name from v$database].\n[W000 01\/04 11:04:35.47] Query result is 'DBIT122_SITE2'\nConnected to \"DBIT122_SITE2\"\n[W000 01\/04 11:04:35.47] Checking broker version [BEGIN :version := dbms_drs.dg_broker_info('VERSION'); END;].\n[W000 01\/04 11:04:35.47] Oracle database version is '12.2.0.1.0'\nConnected as SYSDBA.\nDGMGRL&gt; show configuration;\n\nConfiguration - DBIT122\n\n  Protection Mode: MaxAvailability\n  Members:\n  DBIT122_SITE1 - Primary database\n    DBIT122_SITE2 - Physical standby database\n\nFast-Start Failover: DISABLED\n\nConfiguration Status:\nSUCCESS   (status updated 49 seconds ago)\n\nDGMGRL&gt; switchover to 'DBIT122_SITE2';\nPerforming switchover NOW, please wait...\nNew primary database \"DBIT122_SITE2\" is opening...\nOperation requires start up of instance \"DBIT122\" on database \"DBIT122_SITE1\"\nStarting instance \"DBIT122\"...\n[W000 01\/04 11:05:04.99] Connecting to database using (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbidg01)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=DBIT122_SITE1_DGMGRL)(UR=A)(INSTANCE_NAME=DBIT122)(SERVER=DEDICATED))).\n[W000 01\/04 11:05:04.99] Attempt logon as SYSDG\n[W000 01\/04 11:05:06.04] Attempt logon as SYSDBA\nORA-01017: invalid username\/password; logon denied\n\nWarning: You are no longer connected to ORACLE.\n\nPlease complete the following steps to finish switchover:\n        start up and mount instance \"DBIT122\" of database \"DBIT122_SITE1\"\n\nDGMGRL&gt;<\/pre>\n<p>What is happening here? The Broker is not using the connect string &#8220;DBIT122_SITE1&#8221;, it is using the description list \u00a0&#8220;(DESCRIPTION=(ADDRESS &#8230;..)&#8221;, and when I look up my credentials in the wallet, I see only credentials for &#8220;DBIT122_SITE1 SYS&#8221; and &#8220;DBIT122_SITE2 SYS&#8221;.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">oracle@dbidg01:\/home\/oracle\/ [DBIT122] mkstore -wrl \/u01\/app\/oracle\/admin\/wallets -listCredential\nOracle Secret Store Tool : Version 12.2.0.1.0\nCopyright (c) 2004, 2016, Oracle and\/or its affiliates. All rights reserved.\n\nEnter wallet password:\nList credential (index: connect_string username)\n3: DBIT122_SITE2 SYS\n2: DBIT122_SITE1 SYS\n1: rcat rcat<\/pre>\n<p>The solution here is, to add the description list from the property StaticConnectIdentifier.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">DGMGRL&gt; show database 'DBIT122_SITE1' StaticConnectIdentifier;\n  StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbidg01)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=DBIT122_SITE1_DGMGRL)(UR=A)(INSTANCE_NAME=DBIT122)(SERVER=DEDICATED)))'\n\nDGMGRL&gt; show database 'DBIT122_SITE2' StaticConnectIdentifier;\n  StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbidg02)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=DBIT122_SITE2_DGMGRL)(UR=A)(INSTANCE_NAME=DBIT122)(SERVER=DEDICATED)))'<\/pre>\n<p>Ok. Lets add the new credentials to our wallet. Be careful that you specify it exactly like they show up in the StaticConnectIdentifier.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">-- Primary\n\noracle@dbidg01:\/home\/oracle\/ [DBIT122] mkstore -wrl \/u01\/app\/oracle\/admin\/wallets -createCredential '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbidg01)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=DBIT122_SITE1_DGMGRL)(UR=A)(INSTANCE_NAME=DBIT122)(SERVER=DEDICATED)))' SYS\nOracle Secret Store Tool : Version 12.2.0.1.0\nCopyright (c) 2004, 2016, Oracle and\/or its affiliates. All rights reserved.\n\nYour secret\/Password is missing in the command line\nEnter your secret\/Password:\nRe-enter your secret\/Password:\nEnter wallet password:\n\noracle@dbidg01:\/home\/oracle\/ [DBIT122] mkstore -wrl \/u01\/app\/oracle\/admin\/wallets -createCredential '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbidg02)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=DBIT122_SITE2_DGMGRL)(UR=A)(INSTANCE_NAME=DBIT122)(SERVER=DEDICATED)))' SYS\nOracle Secret Store Tool : Version 12.2.0.1.0\nCopyright (c) 2004, 2016, Oracle and\/or its affiliates. All rights reserved.\n\nYour secret\/Password is missing in the command line\nEnter your secret\/Password:\nRe-enter your secret\/Password:\nEnter wallet password:\n\noracle@dbidg01:\/home\/oracle\/ [DBIT122] mkstore -wrl \/u01\/app\/oracle\/admin\/wallets -listCredential\nOracle Secret Store Tool : Version 12.2.0.1.0\nCopyright (c) 2004, 2016, Oracle and\/or its affiliates. All rights reserved.\n\nEnter wallet password:\nList credential (index: connect_string username)\n5: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbidg02)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=DBIT122_SITE2_DGMGRL)(UR=A)(INSTANCE_NAME=DBIT122)(SERVER=DEDICATED))) SYS\n4: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbidg01)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=DBIT122_SITE1_DGMGRL)(UR=A)(INSTANCE_NAME=DBIT122)(SERVER=DEDICATED))) SYS\n3: DBIT122_SITE2 SYS\n2: DBIT122_SITE1 SYS\n1: rcat rcat\n\n\n-- Standby\n\noracle@dbidg02:\/home\/oracle\/ [DBIT122] mkstore -wrl \/u01\/app\/oracle\/admin\/wallets -createCredential '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbidg01)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=DBIT122_SITE1_DGMGRL)(UR=A)(INSTANCE_NAME=DBIT122)(SERVER=DEDICATED)))' SYS\nOracle Secret Store Tool : Version 12.2.0.1.0\nCopyright (c) 2004, 2016, Oracle and\/or its affiliates. All rights reserved.\n\nYour secret\/Password is missing in the command line\nEnter your secret\/Password:\nRe-enter your secret\/Password:\nEnter wallet password:\n\noracle@dbidg02:\/home\/oracle\/ [DBIT122] mkstore -wrl \/u01\/app\/oracle\/admin\/wallets -createCredential '(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbidg02)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=DBIT122_SITE2_DGMGRL)(UR=A)(INSTANCE_NAME=DBIT122)(SERVER=DEDICATED)))' SYS\nOracle Secret Store Tool : Version 12.2.0.1.0\nCopyright (c) 2004, 2016, Oracle and\/or its affiliates. All rights reserved.\n\nYour secret\/Password is missing in the command line\nEnter your secret\/Password:\nRe-enter your secret\/Password:\nEnter wallet password:\n\noracle@dbidg02:\/home\/oracle\/ [DBIT122] mkstore -wrl \/u01\/app\/oracle\/admin\/wallets -listCredential\nOracle Secret Store Tool : Version 12.2.0.1.0\nCopyright (c) 2004, 2016, Oracle and\/or its affiliates. All rights reserved.\n\nEnter wallet password:\nList credential (index: connect_string username)\n5: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbidg02)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=DBIT122_SITE2_DGMGRL)(UR=A)(INSTANCE_NAME=DBIT122)(SERVER=DEDICATED))) SYS\n4: (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbidg01)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=DBIT122_SITE1_DGMGRL)(UR=A)(INSTANCE_NAME=DBIT122)(SERVER=DEDICATED))) SYS\n3: DBIT122_SITE2 SYS\n2: DBIT122_SITE1 SYS\n1: rcat rcat<\/pre>\n<p>After everything is setup and done, lets try again the switchover in debug mode.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">oracle@dbidg01:\/home\/oracle\/ [DBIT122] dgmgrl -debug\nDGMGRL for Linux: Release 12.2.0.1.0 - Production on Wed Jan 4 11:22:38 2017\n\nCopyright (c) 1982, 2016, Oracle and\/or its affiliates.  All rights reserved.\n\nWelcome to DGMGRL, type \"help\" for information.\nDGMGRL&gt; connect \/@DBIT122_SITE1\n[W000 01\/04 11:22:47.94] Connecting to database using DBIT122_SITE1.\n[W000 01\/04 11:22:47.94] Attempt logon as SYSDG\n[W000 01\/04 11:22:49.02] Attempt logon as SYSDBA\n[W000 01\/04 11:22:49.06] Executing query [select db_unique_name from v$database].\n[W000 01\/04 11:22:49.06] Query result is 'DBIT122_SITE1'\nConnected to \"DBIT122_SITE1\"\n[W000 01\/04 11:22:49.06] Checking broker version [BEGIN :version := dbms_drs.dg_broker_info('VERSION'); END;].\n[W000 01\/04 11:22:49.06] Oracle database version is '12.2.0.1.0'\nConnected as SYSDBA.\nDGMGRL&gt; switchover to 'DBIT122_SITE1';\nPerforming switchover NOW, please wait...\nNew primary database \"DBIT122_SITE1\" is opening...\nOperation requires start up of instance \"DBIT122\" on database \"DBIT122_SITE2\"\nStarting instance \"DBIT122\"...\n[W000 01\/04 11:23:18.07] Connecting to database using (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbidg02)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=DBIT122_SITE2_DGMGRL)(UR=A)(INSTANCE_NAME=DBIT122)(SERVER=DEDICATED))).\n[W000 01\/04 11:23:18.07] Attempt logon as SYSDG\n[W000 01\/04 11:23:19.15] Attempt logon as SYSDBA\n[W000 01\/04 11:23:20.23] Executing query [select db_unique_name from v$database].\nORA-01034: ORACLE not available\nProcess ID: 0\nSession ID: 0 Serial number: 0\n\nORACLE instance started.\n[W000 01\/04 11:23:36.03] Connecting to database using (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbidg02)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=DBIT122_SITE2_DGMGRL)(UR=A)(INSTANCE_NAME=DBIT122)(SERVER=DEDICATED))).\n[W000 01\/04 11:23:36.03] Attempt logon as SYSDG\n[W000 01\/04 11:23:37.13] Attempt logon as SYSDBA\n[W000 01\/04 11:23:37.17] Executing query [select db_unique_name from v$database].\nORA-01507: database not mounted\n\n[W000 01\/04 11:23:37.20] Checking broker version [BEGIN :version := dbms_drs.dg_broker_info('VERSION'); END;].\n[W000 01\/04 11:23:37.20] Oracle database version is '12.2.0.1.0'\n[W000 01\/04 11:23:37.20] Executing statement [alter database mount].\n[W000 01\/04 11:23:42.66] Statement [alter database mount] executed successfully.\nDatabase mounted.\n[W000 01\/04 11:23:42.66] Checking for bootstrap done...\n[W000 01\/04 11:23:42.67] Connecting to database using (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbidg02)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=DBIT122_SITE2_DGMGRL)(UR=A)(INSTANCE_NAME=DBIT122)(SERVER=DEDICATED))).\n[W000 01\/04 11:23:42.67] Attempt logon as SYSDG\n[W000 01\/04 11:23:43.77] Attempt logon as SYSDBA\n[W000 01\/04 11:23:43.82] Executing query [select db_unique_name from v$database].\n[W000 01\/04 11:23:43.83] Query result is 'DBIT122_SITE2'\nConnected to \"DBIT122_SITE2\"\n[W000 01\/04 11:23:43.83] Checking broker version [BEGIN :version := dbms_drs.dg_broker_info('VERSION'); END;].\n[W000 01\/04 11:23:43.83] Oracle database version is '12.2.0.1.0'\n[W000 01\/04 11:23:55.85] Done waiting for bootstrap after 0 retries\nSwitchover succeeded, new primary is \"DBIT122_SITE1\"\nDGMGRL&gt;\nDGMGRL&gt; show configuration;\n\nConfiguration - DBIT122\n\n  Protection Mode: MaxAvailability\n  Members:\n  DBIT122_SITE1 - Primary database\n    DBIT122_SITE2 - Physical standby database\n\nFast-Start Failover: DISABLED\n\nConfiguration Status:\nSUCCESS   (status updated 60 seconds ago)\n\nDGMGRL&gt;<\/pre>\n<p>Now it worked perfectly, I can run now my switchover operations with wallets and I can run my scripts now without a password in clear text, like the following.<\/p>\n<pre class=\"brush: actionscript3; gutter: true; first-line: 1\">oracle@dbidg01:\/home\/oracle\/ [DBIT122] dgmgrl &lt;&lt;-EOF\n&gt; connect \/@DBIT122_SITE1\n&gt; show configuration verbose;\n&gt; EOF<\/pre>\n<h3>Conclusion<\/h3>\n<p>Doing DataGuard switchovers with wallets work perfectly, if the setup was done correctly, and besides that, you can eliminate a lot of passwords in clear text that you might have laying around.<\/p>\n<p>Cheers,<\/p>\n<p>William<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By William Sescu I would like to make my DataGuard environment more secure, by eliminating the typing of &#8220;connect sys\/Manager1&#8221; for my DGMGRL commands. Especially the ones, that I have in my scripts. For example: oracle@dbidg01:\/home\/oracle\/ [DBIT122] dgmgrl &lt;&lt;-EOF &gt; connect sys\/Manager1 &gt; show configuration verbose; &gt; EOF or something like that: oracle@dbidg01:\/u01\/app\/oracle\/local\/dg\/ [DBIT122] cat&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],"tags":[221,209,1025],"class_list":["post-9644","post","type-post","status-publish","format-standard","category-database","tag-data-guard","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>Oracle 12cR2 - DataGuard Switchover with Oracle Wallets - 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\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Oracle 12cR2 - DataGuard Switchover with Oracle Wallets\" \/>\n<meta property=\"og:description\" content=\"By William Sescu I would like to make my DataGuard environment more secure, by eliminating the typing of &#8220;connect sys\/Manager1&#8221; for my DGMGRL commands. Especially the ones, that I have in my scripts. For example: oracle@dbidg01:\/home\/oracle\/ [DBIT122] dgmgrl &lt;&lt;-EOF &gt; connect sys\/Manager1 &gt; show configuration verbose; &gt; EOF or something like that: oracle@dbidg01:\/u01\/app\/oracle\/local\/dg\/ [DBIT122] cat&hellip;&nbsp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\/\" \/>\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=\"2017-01-04T11:48:41+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=\"11 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\\\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\\\/\"},\"author\":{\"name\":\"Oracle Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/bf7c7eb0bec165183207237c9d0ee1d5\"},\"headline\":\"Oracle 12cR2 &#8211; DataGuard Switchover with Oracle Wallets\",\"datePublished\":\"2017-01-04T11:48:41+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\\\/\"},\"wordCount\":378,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"keywords\":[\"Data Guard\",\"Oracle 12c\",\"Oracle 12cR2\"],\"articleSection\":[\"Database\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\\\/\",\"name\":\"Oracle 12cR2 - DataGuard Switchover with Oracle Wallets - dbi services Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2017-01-04T11:48:41+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Oracle 12cR2 &#8211; DataGuard Switchover with Oracle Wallets\"}]},{\"@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":"Oracle 12cR2 - DataGuard Switchover with Oracle Wallets - 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\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\/","og_locale":"en_US","og_type":"article","og_title":"Oracle 12cR2 - DataGuard Switchover with Oracle Wallets","og_description":"By William Sescu I would like to make my DataGuard environment more secure, by eliminating the typing of &#8220;connect sys\/Manager1&#8221; for my DGMGRL commands. Especially the ones, that I have in my scripts. For example: oracle@dbidg01:\/home\/oracle\/ [DBIT122] dgmgrl &lt;&lt;-EOF &gt; connect sys\/Manager1 &gt; show configuration verbose; &gt; EOF or something like that: oracle@dbidg01:\/u01\/app\/oracle\/local\/dg\/ [DBIT122] cat&hellip;&nbsp;","og_url":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\/","og_site_name":"dbi services Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2017-01-04T11:48:41+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":"11 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\/"},"author":{"name":"Oracle Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bf7c7eb0bec165183207237c9d0ee1d5"},"headline":"Oracle 12cR2 &#8211; DataGuard Switchover with Oracle Wallets","datePublished":"2017-01-04T11:48:41+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\/"},"wordCount":378,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"keywords":["Data Guard","Oracle 12c","Oracle 12cR2"],"articleSection":["Database"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\/","url":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\/","name":"Oracle 12cR2 - DataGuard Switchover with Oracle Wallets - dbi services Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2017-01-04T11:48:41+00:00","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/oracle-12cr2-dataguard-switchover-with-oracle-wallets\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Oracle 12cR2 &#8211; DataGuard Switchover with Oracle Wallets"}]},{"@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\/9644","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=9644"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/9644\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=9644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=9644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=9644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}