Tag Archives: Shutdown the primary Server

Stop and start standby database in Oracle Dataguard environment

How to Stop and Start Oracle Data Guard Environment – A DBA’s Guide

Oracle Data Guard ensures high availability, data protection, and disaster recovery for enterprise databases. Whether you’re performing maintenance or preparing for a switchover, knowing how to properly stop and start the Data Guard environment is essential.

🔻 Stopping the Data Guard Environment

1. Stop Redo Apply on Standby

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;

2. Disable Archive Log Transport from Primary

ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_n=DEFER

3. Optional: Shut Down the Standby Database

SHUTDOWN IMMEDIATE;

Starting the Data Guard Environment

1. Start the Standby Database (if shut down)

STARTUP MOUNT;

. 2. Enable Archive Log Transport on Primary

ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_n=ENABLE

3. Start Redo Apply on Standby

  • Standard Apply:
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

Real time Apply:

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT FROM SESSION;