{"id":2990,"date":"2025-03-30T06:18:58","date_gmt":"2025-03-30T06:18:58","guid":{"rendered":"https:\/\/w3buddy.com\/?p=2990"},"modified":"2026-01-15T13:10:28","modified_gmt":"2026-01-15T07:40:28","slug":"oracle-manual-db-switchover-primary-to-standby-with-dgmgrl","status":"publish","type":"post","link":"https:\/\/w3buddy.com\/blog\/oracle-manual-db-switchover-primary-to-standby-with-dgmgrl\/","title":{"rendered":"Oracle Manual DB Switchover: Primary to Standby with DGMGRL"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A switchover in Oracle Data Guard is a planned role reversal between the primary and standby databases, ensuring minimal downtime. This guide provides a step-by-step process to manually switch from the primary database to a physical standby database using DGMGRL in Oracle.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before performing the switchover, ensure the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Data Guard is properly configured between the primary and standby databases.<\/li>\n\n\n\n<li>Both databases are in sync.<\/li>\n\n\n\n<li>You have SYSDBA privileges.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Set the ORACLE_SID<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before using DGMGRL, set the ORACLE_SID to match your database instance:<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Connect to DGMGRL<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run the following command to connect to DGMGRL as SYSDBA:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-batch\">dgmgrl sys\/&lt;PASSWORD>@&lt;PRIMARY_DB><\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Validate the Database Readiness<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run the following command to connect to DGMGRL as SYSDBA:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-bash\">DGMGRL> validate database &lt;PRIMARY_DB>;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected output should confirm:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-bash\">Database Role: Primary database\nReady for Switchover: YES\nManaged by Clusterware: YES<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Perform the Switchover<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Execute the following command in DGMGRL:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-bash\">DGMGRL> switchover to &lt;STANDBY_DB>;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected Output:<\/p>\n\n\n\n<pre class=\"wp-block-prismatic-blocks\"><code class=\"language-bash\">Performing switchover NOW, please wait...\nOperation requires a connection to database \"&lt;STANDBY_DB>\"\nConnecting ...\nConnected to \"&lt;STANDBY_DB>\"\nConnected as SYSDBA.\nNew primary database \"&lt;STANDBY_DB>\" is opening...\nOracle Clusterware is restarting database \"&lt;PRIMARY_DB>\" ...\nConnected to \"&lt;PRIMARY_DB>\"\nSwitchover succeeded, new primary is \"&lt;STANDBY_DB>\"<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">What Happens During This Step?<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The command switches roles between primary and standby.<\/li>\n\n\n\n<li>Oracle connects to the target standby database.<\/li>\n\n\n\n<li>The new primary database is opened.<\/li>\n\n\n\n<li>The former primary is converted into a standby database.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Verify the Switchover<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Ensure that:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The former standby is now the primary.<\/li>\n\n\n\n<li>The former primary is now the standby.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 6: Update OND Hostnames<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If your environment uses OND hostnames, update them accordingly to reflect the new primary and standby servers.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Additional Considerations<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If you encounter issues, check the alert logs and Data Guard broker logs.<\/li>\n\n\n\n<li>If using Fast-Start Failover (FSFO), ensure it is properly reconfigured.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Performing a manual switchover in Oracle Data Guard ensures seamless role transitions between databases. This method is useful for maintenance activities, disaster recovery testing, and planned database role changes.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A switchover in Oracle Data Guard is a planned role reversal between the primary and standby databases, ensuring minimal downtime. This guide provides a step-by-step process to manually switch from the primary database to a physical standby database using DGMGRL in Oracle. Prerequisites Before performing the switchover, ensure the following: Step 1: Set the ORACLE_SID [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"googlesitekit_rrm_CAowu461DA:productID":"","footnotes":""},"categories":[1225],"tags":[],"class_list":["post-2990","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/2990","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/comments?post=2990"}],"version-history":[{"count":3,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/2990\/revisions"}],"predecessor-version":[{"id":2995,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/posts\/2990\/revisions\/2995"}],"wp:attachment":[{"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/media?parent=2990"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/categories?post=2990"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/w3buddy.com\/blog\/wp-json\/wp\/v2\/tags?post=2990"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}