Posted on

DGMGRL Usage Oracle Dataguard DGMGRL Usage


Here are the steps to configure and start using DGMGRL the command-line interface at oracle dataguard broker
1) Set the value of dg_broker_start to true.
SQL> alter system set dg_broker_start=true;
System altered.
2) Open a parallel window and type dgmgrl in the command-line. Make sure the following window does open
dgmgrl>
3) Connect as sys user to the primary database. Don’t specify “as sysdba” as default connection is as sysdba. In recent versions the default connection privilege is SYSDG
DGMGRL> connect sys/learnersreference;
Connected as SYSDG
4) Get the primary database unique name from within sql prompt in parallel window
SQL> show parameter db_unique_name
NAME TYPE VALUE
———————————— ———– ————————-
db_unique_name string test
5) Create the configuration.
DGMGRL> create configuration ‘testdg’ as
> primary database is ‘test’
> connect identifier is ‘test’;
Configuration “testdg” created with primary database “test”
DGMGRL>
6) List the configuration using show command.
DGMGRL> show configuration;
Configuration Name: testdg
Enabled: NO
Protection Mode: MaxPerformance
Fast-Start Failover: DISABLED
Databases: test – Primary database
Current status for “testdg”:DISABLED
DGMGRL>
To get more detailed information we can make use of command show configuration verbose as well
7) Try creating standby database:
DGMGRL> add database ‘test_stdby’ as
> connect identifier is ‘new’
> maintained as physical;
Error: ORA-16796: one or more properties could not be imported from the database Failed.
DGMGRL >
Reason:
The broker was unable to import property values for the database being added to the broker configuration. This error indicates:
– the net-service-name specified in DGMGRL”s CREATE CONFIGURATION or ADD DATABASE command is not one that provides access to the database being added, or
– there are no instances running for the database being added.
Action
Remove the database from the configuration using the REMOVE CONFIGURATION or REMOVE DATABASE command. Make sure that the database to be added has at least one instance running and that the net-service-name provides access to the running instance. Then reissue the CREATE CONFIGURATION or ADD DATABASE command.

Leave a Reply

Your email address will not be published.