Configuring Data Guard Broker CLI in RAC Environment

Before configuring & using the data guard broker command line interface (CLI), we need to configure some parameters at the database level on primary & standby locations.

On primary site,

$ export ORACLE_SID=+ASM1

SQL> ALTER DISKGROUP FLASH1 ADD DIRECTORY ‘+FLASH1//’;

OR

$ asmcmd -p

ASMCMD [+] > cd CFLASH1/
ASMCMD [+] > mkdir

$ export ORACLE_SID=PRIMDB

SQL> alter system set dg_broker_start = false scope=both sid=’*’;

SQL> alter system set dg_broker_config_file1=’+FLASH1///dr1DB.dat’ sid=’*’;

SQL> alter system set dg_broker_config_file2=’+FLASH1///dr2DB.dat’ sid=’*’;

SQL> alter system set dg_broker_start=true scope=both sid=’*’;

On standby site,

SQL> alter system set dg_broker_config_file1=’+FLASH1///dr1DB.dat’ sid=’*’;

SQL> alter system set dg_broker_config_file2=’+FLASH1///dr2DB.dat’ sid=’*’;

SQL> alter system set dg_broker_start=true scope=both sid=’*’;

NOTE: Location of configuration files should be a shared device. In this case, it is an ASM diskgroup.

Once these parameters are changed at the server level, we’ll have to configure the CLI. This command line utility is very useful when role transition is required.

$ dgmgrl
DGMGRL for Solaris: Version 10.2.0.3.0 – 64bit Production

Copyright (c) 2000, 2005, Oracle. All rights reserved.

Welcome to DGMGRL, type “help” for information.
DGMGRL>

DGMGRL> connect /
Connected.

STEP 1

DGMGRL> CREATE CONFIGURATION TEST_DG AS PRIMARY DATABASE IS PRIM CONNECT IDENTIFIER IS PRIMDB;

DGMGRL> ADD DATABASE STDBY AS CONNECT IDENTIFIER IS STDBYDB MAINTAINED AS LOGICAL;

DGMGRL> ENABLE CONFIGURATION;

DGMGRL> show configuration;

Configuration

Name: TEST_DG
Enabled: YES
Protection Mode: MaxPerformance
Fast-Start Failover: DISABLED

Databases:

STDBYDB – Logical standby database
PRIMDB – Primary database

Current status for ” TEST_DG”:

SUCCESS

DGMGRL>

To check the specific details about a single database, we can use

DGMGRL> show database verbose STDBYDB;
DGMGRL> show database verbose PRIMDB;
DGMGRL> show instance verbose “PRIMDB1”;
Caution: It is case sensitive. Always add double quotes.

Parameter listed in this output are categorised as

1. Database level 2. Instance level – trailing with (*)

For example to edit StandbyArchiveLocation, we can use

DGMGRL> edit instance “PRIMDB1” on database “PRIMDB” set property StandbyArchiveLocation=’+FLASH/PRIMDB/SARCH/’;

Advertisements
This entry was posted in Oracle Data Guard, Oracle Data Guard Broker and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s