CertMan

Post Contents

Oracle 19c Automatic Switchover in Data Guard Using Broker

Oracle 19c Automatic Switchover in Data Guard Using Broker

Executing a switchover using the Data Guard broker in Oracle 19c is a vital task for database administrators, ensuring system availability and maintaining data integrity. This tutorial will guide you through the process of performing an automatic switchover in Data Guard using the broker (DGMGRL). This process transitions the primary database to a standby role and promotes the standby database to the primary role. This operation is essential for planned maintenance and ensures no data loss.

 

Connecting to the Primary Database with DGMGRL

To begin the switchover process, connect to the primary database using the Data Guard broker.

dgmgrl sys/oracle@orcl

After connecting, verify the state of the primary database.

SHOW CONFIGURATION;

Ensure that the primary database and all standby databases are ready for the switchover.

 

Performing the Switchover to the Standby Database using Broker

Initiate the switchover process by instructing the broker to transition the primary database to a standby role.

SWITCHOVER TO 'standby_db';

The broker will perform the necessary steps to switch the roles between the primary and standby databases. During this process, the primary database transitions to the standby role, and the standby database becomes the primary.

 

Connecting to the New Primary Database

After the switchover, connect to the new primary database to verify its status.

dgmgrl sys/oracle@standby_db

Ensure that the new primary database is open and functioning correctly.

SHOW DATABASE VERBOSE 'standby_db';

 

Switching Back to the Original Primary Database using Broker

If necessary, you can switch back to the original primary database by repeating the switchover process.

SWITCHOVER TO 'primary_db';

Again, the broker will manage the role transition, switching the current primary database to the standby role and promoting the standby to the primary role.

 

Verifying the Switchover using Broker

After completing the switchover, it is essential to verify that all databases are functioning correctly in their new roles. Check the configuration and the status of each database.

SHOW CONFIGURATION;
SHOW DATABASE VERBOSE 'primary_db';
SHOW DATABASE VERBOSE 'standby_db';

These commands ensure that the databases are properly configured and operating as expected in their new roles.

 

Conclusion

Performing a Data Guard switchover using the broker is a critical operation that ensures the continuity and availability of your database systems. By following this tutorial, we have outlined the necessary steps to prepare, execute, and verify the switchover process. Ensuring that the primary and standby databases are properly configured and ready for the switchover is crucial. The Data Guard broker simplifies this process, allowing for seamless role transitions and maintaining data integrity throughout.

See more on Oracle’s website!

Be Oracle Dataguard Certified Professional, this world is full of opportunities for qualified DBAs!

Leave a Reply

Your email address will not be published. Required fields are marked *