In today’s article i will tell you how to Disable Data Guard Broker Configuration.
We may want to disable the broker configuration. Commands executed in SQLPLUS after being disabled are valid until the broker is enabled.
The broker will expire from the moment it is enabled. The reason is that as soon as the broker is enabled, the DMON process reads the configuration file and shapes the broker accordingly.
If we want the parameter changes made while the Broker is DISABLE’ to be permanent, then we change the parameters from the Broker.
This is because the DMON parameter is active even if the broker is DISABLED. In this case, the DMON process writes the changes made to the configuration file.
When enabled, it shapes the Configuration accordingly.
Let’s test it.
[Commands run from DGMGRL are all run from Primary-1 by connecting to DGMGRL]1. We query from the broker to see some information of the Logical Standby Database.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
DGMGRL> show database logical Database - logical Role: LOGICAL STANDBY Intended State: APPLY-ON Transport Lag: 0 seconds (computed 1 second ago) Apply Lag: 0 seconds (computed 1 second ago) Apply Rate: 0 Byte/s Instance(s): primary1 primary2 (apply instance) Database Status: SUCCESS |
2. We DISABLE the broker.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
DGMGRL> disable configuration Disabled. DGMGRL> show configuration Configuration - Broker _Configuration Protection Mode: MaxPerformance Databases: primary - Primary database standby - Physical standby database logical - Logical standby database Fast-Start Failover: DISABLED Configuration Status: DISABLED |
3. We query the tables under the TEST schema.
1 2 3 4 5 |
[Primary-1] SQL> select table_name from dba_tables where owner='TEST'; TABLE_NAME ------------------------------ EMPLOYEES_YEDEK |
1 2 3 4 5 |
[Physical-1] SQL> select table_name from dba_tables where owner='TEST'; TABLE_NAME ------------------------------ EMPLOYEES_YEDEK |
1 2 3 4 5 |
[Logical-1] SQL> select table_name from dba_tables where owner='TEST'; TABLE_NAME ------------------------------ EMPLOYEES_YEDEK |
4. We create a new table under the TEST schema.
1 2 3 4 5 6 7 8 9 10 |
[Primary-1] SQL> create table test.regions_yedek as select * from hr.regions; Table created. [Primary-1] SQL> select table_name from dba_tables where owner='TEST'; TABLE_NAME ------------------------------ EMPLOYEES_YEDEK REGIONS_YEDEK |
1 2 3 4 5 6 |
[Physical-1] SQL> select table_name from dba_tables where owner='TEST'; TABLE_NAME ------------------------------ EMPLOYEES_YEDEK REGIONS_YEDEK |
1 2 3 4 5 6 |
[Logical-1] SQL> select table_name from dba_tables where owner='TEST'; TABLE_NAME ------------------------------ EMPLOYEES_YEDEK REGIONS_YEDEK |
5. We stop Redo-Apply in Logical Standby Database.
1 2 3 |
[Logical-2] SQL> alter database stop logical standby apply; Database altered. |
6. We create a new table under the TEST schema.
1 2 3 4 5 6 7 8 9 10 11 |
[Primary-1] SQL> create table test.departments_yedek as select * from hr.departments; Table created. [Primary-1] SQL> select table_name from dba_tables where owner='TEST'; TABLE_NAME ------------------------------ EMPLOYEES_YEDEK REGIONS_YEDEK DEPARTMENTS_YEDEK |
1 2 3 4 5 6 7 |
[Physical-1] SQL> select table_name from dba_tables where owner='TEST'; TABLE_NAME ------------------------------ EMPLOYEES_YEDEK REGIONS_YEDEK DEPARTMENTS_YEDEK |
1 2 3 4 5 6 |
[Logical-1] SQL> select table_name from dba_tables where owner='TEST'; TABLE_NAME ------------------------------ EMPLOYEES_YEDEK REGIONS_YEDEK |
7. We ENABLE the configuration.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
DGMGRL> enable configuration Enabled. DGMGRL> show database logical Database - logical Role: LOGICAL STANDBY Intended State: APPLY-ON Transport Lag: 0 seconds (computed 0 seconds ago) Apply Lag: 9 seconds (computed 0 seconds ago) Apply Rate: 0 Byte/s Instance(s): primary1 primary2 (apply instance) Database Status: SUCCESS |
[Logical-2]—->ALERT LOG
1 2 3 4 5 |
ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE ALTER DATABASE START LOGICAL STANDBY APPLY (primary2) with optional part IMMEDIATE Attempt to start background Logical Standby process |
8. We check again whether the table is in Logical Standby.
1 2 3 4 5 6 7 |
[Logical-1] SQL> select table_name from dba_tables where owner='TEST'; TABLE_NAME ------------------------------ EMPLOYEES_YEDEK REGIONS_YEDEK DEPARTMENTS_YEDEK |