DGMGRL Command Tips
Oracle Database Tips by Donald BurlesonDecember 9, 2015
Oracle Data Guard - Data Guard Broker
Data Guard Using DGMGRL
Data Guard manager greatly
simplifies the otherwise complicated tasks of log management, role
management, and data protection modes. It can be used to monitor the
overall health of the entire configuration as well as an individual
site. This section will investigate the use of the CLI interface of
Data Guard manager to administer a configuration.
The information presented
will start with the creation of a configuration followed by more
complicated tasks such as log management, switchover, failover and
manipulating data protection modes. As always, Oracle documentation
remains the largest single source of information on this topic.
As explained earlier, a
configuration contains the primary and standby sites. In this
section, the pre-requisites and procedures to create a configuration
will be presented.
One requirement of creating
a configuration using the CLI interface is that the standby
databases participating in the configuration should exist. CLI
interface cannot be used to create a standby database.
Assume that the primary
database "appsdb", physical Oracle instance
"stdbydb" and logical
"logstdby" already exist. To create a
configuration, ensure that the broker is running on the primary and
all participating standby databases. On the primary site, start the
CLI environment and connect to the primary database.
DGMGRL>connect sys/<sys password>
An account with the
SYSDBA privilege will have to be used.
Use the CREATE
CONFIGURATION command to create a configuration.
The following code snippet shows the usage of this statement in
CONFIGURATION 'appsconfig' AS PRIMARY SITE IS 'appsdb'
RESOURCE IS 'appsdb' HOSTNAME IS 'jrpr01' INSTANCE NAME IS 'appsdb'
SERVICE NAME IS 'appsprimary' SITE IS MAINTAINED AS PHYSICAL;
Oracle will validate the
HOSTNAME and INSTANCE NAME
from the v$instance view. Arguments
Configuration, Site and Resource are user–defined labels. The
service name should match the SQL*Net service name for the primary
database on all hosts participating in the configuration. There
should be an identical service-naming scheme on all the host
machines within a configuration.
The last argument,
SITE MAINTAINED AS, signifies the type of
that this primary database will assume after the
switchover operation. When a primary database is marked as physical,
it cannot be turned into a logical Oracle instance
by switching it
over with a standby database. The CREATE CONFIGURATION
statement has been simplified in Oracle10g:
Guard Configuration attributes
Viewing Configuration and
DGMGRL> SHOW RESOURCE VERBOSE 'appsdb' ON
Manager Type: internal
Standby Type: PHYSICAL
INTENDED_STATE = 'READ-WRITE-XPTON'
ENABLED = 'yes'
IGNORE_STATUS = 'no'
LogXptMode = 'ARCH'
Dependency = ''
Alternate = ''
DelayMins = '0'