Remove Physical Standby Configuration
1. Put Primary Database in Maximum Performance Mode
On the Primary database, put the Database in Maximum Performance Mode (if not already):
SQL> ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE;
or if using the Data Guard Broker:
DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MAXPERFORMANCE;
2. Remove Data Guard Broker Configuration
If you are using the Data Guard Broker, remove the Data Guard Broker Configuration:
DGMGRL> REMOVE CONFIGURATION;
3. Unset Data Guard-specific Initialization Parameters
Unset/Remove following Initialization Parameters from the (S)PFILE of the Primary Database:
LOG_ARCHIVE_DEST_n pointing to the Standby Database and valid for STANDBY_LOGFILES
4. Drop Standby Redologs from the Primary Database
Use following Query to check for Standby Redolog Groups:
SQL> SELECT GROUP# FROM V$STANDBY_LOG;
Use following Command to Drop the Standby Redo logs:
SQL> ALTER DATABASE DROP STANDBY LOGFILE GROUP <GROUP_NUMBER>;
SQL> alter database drop standby logfile group 3;
Drop all Standby Redolog Groups using above Command.
5. Drop the Data Guard Broker Configuration Files if used.
Thanks dear , your mastery of the subject is impressive!!!!
Truly exceptionally fantastic
I gave you an A+++ rating
1 person found this helpful
with this answer you have not only stopped or disabled the dataguard.
You have removed all dataguard configuration.
When your standby server is up and runnng again, you have to build a new standby database.
But if the server is only a few hours down and you have fixed it, you might want to start your standby again without the timeconsuming rebuild.
You can access the dataguard configuration also from the primary database.
You can disable the log apply in the standby:
dgmgrl> edit database 'STANDBY_DB' set state='APPLY-OFF;
If the first step doesn't work,
You can at least stop the log shipping to the standby:
dgmgrl> edit database 'STANDBY_DB' set state='LOG-TRANSPORT-OFF';
Check the status
dgmgrl> show database verbose 'STANDBY_DB'
But be aware that from now the archives logs won't be shipped to the standby host and won't be deleted because rman recognized that the archivelogs aren't applied .
So you have to monitor the archivelog destinations on your primary host.
Thanks dear, very informative! I learned new things here
As far as I know if the standby database is down and below parameters are reset then it will allow to delete the archvies on primary. correct me if i am wrong.
1 person found this helpful
Hi Green Dust,
you are right.
But be careful, If you use dgmgrl to setup a dataguard configuration, use only dgmgrl to change parameter in the databases.
What happen if i failover to standby and drop it?
Does my primary still retain the dataguard config when I start it up again?
How to do this? > Drop the Data Guard Broker Configuration Files if used.
****But be careful, If you use dgmgrl to setup a dataguard configuration, use only dgmgrl to change parameter in the databases.
How do I differentiate the parameters setup in dgmgrl against the parameter setup at sqlplus command line?