After you follow above two posts now it is the time to configure data guard broker.
Step 01: Check for DG_BROKER_START initialization parameter. Login to database through sql*plus and issue show parameter dg_broker_start,
SQL> show parameter dg_broker_start NAME TYPE VALUE ------------------------------------ ----------- ---------------------------- dg_broker_start boolean FALSEIf it is set to FALSE then proceed further. If it is TRUE then your Data Guard broker DMON process is running. So you will not be able to change configuration file parameters. In order to set the configuration file of your own ensure that dg_broker_start is set to FALSE. You can do it by,
SQL> ALTER SYSTEM SET DG_BROKER_START=FALSE;Step 02: Set the configuration filenames for the database.
Two copies of the configuration file are maintained for each database so as to always have a record of the last known valid state of the configuration. When the broker is started for the first time, the configuration files are automatically created and named using a default path name and filename that is operating-system specific. You can override this default path name and filename by setting the following initialization parameters for that database:
DG_BROKER_CONFIG_FILE1
DG_BROKER_CONFIG_FILE2
You can check the current configuration file by,
SQL> show parameter dg_broker_config NAME TYPE VALUE ------------------------------------ ----------- --------------------------- dg_broker_config_file1 string /u01/app/oracle/DR1A.DAT dg_broker_config_file2 string /u01/app/oracle/DR2A.DATYou can change/override these settings. Note that if you are in Oracle RAC instances then these two parameter must be to a raw device or Oracle ASM file or cluster file system file that is shared by every instance of the RAC. For example issue,
SQL> ALTER SYSTEM SET DG_BROKER_CONFIG_FILE1=+DATA/bddipdc/config1.dat; SQL> ALTER SYSTEM SET DG_BROKER_CONFIG_FILE2=+DATA/bddipdc/config2.dat;Step 03: Restart the DMON process by setting DG_BROKER_START to TRUE.
SQL> ALTER SYSTEM SET DG_BROKER_START=TRUE;Step 04: Invoke DGMGRL and connect to the primary database.
$ dgmgrl
The DGMGRL prompt is displayed:
DGMGRL>
Note that, the command you write inside dgmgrl prompt is treated as lowercase. So if you want to write something in uppercase within dgmgrl you have to specify within quote.
To connect to primary database on the Local System issue,
DGMGRL> CONNECT sys; Password: password Connected.If you connect to the Primary Database on a Remote System issue,
DGMGRL> CONNECT sys@NbddipdcStep 05: Create the broker configuration
If your primary database name is BDDIPDC, connect identifier/tns names of primary database is BDDIPDC and you want to name the configuration as DGCONF then your command will be following.
DGMGRL> CREATE CONFIGURATION 'DGCONF' AS PRIMARY DATABASE IS 'BDDIPDC' CONNECT IDENTIFIER IS 'BDDIPDC';After you create configuration, you can issue 'show configuration' in order to show the configuration information.
DGMGRL> SHOW CONFIGURATION;Step 06: Add a standby database to the configuration.
To add a standby database named BDDIPDRS (note that this need to be DB_UNIQUE_NAME) and connect identifier BDDIPDRS issue,
DGMGRL> ADD DATABASE 'BDDIPDRS' AS CONNECT IDENTIFIER IS 'BDDIPDRS';Note that, you can omit single quote if your DB_UNIQUE_NAME is in lowercase.
Use the SHOW CONFIGURATION command to verify that the 'BDDIPDRS' database was added to the 'DGCONF' configuration:
DGMGRL> SHOW CONFIGURATION;
No comments:
Post a Comment