dg_configure_observers
This verb is applicable to database version 12.2 and higher. There are multiple subcommands available for this verb:
dg_configure_observers -start
Starts one or more fast-start failover observers on the specified hosts and Oracle homes for the Data Guard configuration associated with the specified primary database.
Format
emcli dg_configure_observers -start -primary_target_name="<primary target name>" -primary_target_type="oracle_database|rac_database" -observer_input_file="<full pathname of input file>" [-primary_db_creds_name="<primary database credential name>"] [-primary_host_creds_name="<primary database host credential name>"] [ ] indicates that the parameter is optional.
Options
-
primary_target_name
Primary database Enterprise Manager target name. This can be either a single-instance database or a cluster database.
-
primary_target_type
Primary database target type. The allowed values are:-
oracle_database: Single instance database
-
rac_database: Cluster database
-
-
observer_input_file
The name of a file containing the information to start the respective observers. The format of this file as follows:*observer.<i>.observer_name=<#<i>observer name> *observer.<i>.observer_host=<Host name where #<i> observer will be started.> *observer.<i>.observer_orale_home=<Oracle home location on the host where #<i> observer will be started.> *observer.<i>.observer_host_cred_name=<host named credential for user who can access the #<i> observer Oracle home> *observer.<i>.observer_host_wallet_cred_name=<named credential of the Oracle wallet configured in the #<i> observer Oracle home> observer.<i>.is_Master=<Y||N> observer.<i>.observer_runtime_data_file=<Runtime data file path and name for the #<i> observer. If not specified, the file fsfo.dat will be created under the oracle base.> observer.<i>.observer_log_file=<The full path of the #<i> observer log file.> Where <i>:(0,1,2) (*)- Mandatory parameters.
-
primary_db_creds_name
Primary database named credential for a user with SYSDBA or SYSDG role. Preferred credentials are used as the default values.
-
primary_host_creds_name
Primary database host named credential for an operating system user who can access the primary database Oracle home. Preferred credentials are used as the default values.
Example 1
The following example will start the observers 'oemcli1' and 'oemcli2' for the Data Guard configuration associated with primary database 'database'. This will also delete the Enterprise Manager alternate observer and its associated corrective action job for the Data Guard configuration associated with primary database 'database'.
emcli dg_configure_observers -start -delete_alternate_observer -primary_target_name=database -primary_target_type=oracle_database -primary_db_creds_name=DB_CRED -primary_host_creds_name=HOST_CRED -observer_input_file=/scratch/startObs.props
Example 2
The following example will start the observers provided in observer_input_file '/scratch/startObs.props' for the Data Guard configuration associated with primary database 'database'.
emcli dg_configure_observers -start -primary_target_name=database -primary_target_type=oracle_database -primary_db_creds_name=DB_CRED -primary_host_creds_name=HOST_CRED -observer_input_file=/scratch/startObs.props Following is the content of /scratch/startObs.props: observer.0.observer_name=oemcli1 observer.0.observer_host=host1.us.oracle.com observer.0.observer_oracle_home=/scratch/oracle_base1/product/12.2.0/dbhome_1 observer.0.observer_host_cred_name=HOST1_CRED observer.0.observer_host_wallet_cred_name=WC2 observer.0.observer_runtime_data_file=/scratch/oracle_base1/oemcli1/obs_omemcli1_122.dat observer.0.observer_log_file=/scratch/oracle_base1/oemcli1/oemcli1_122.log observer.0.is_Master=Y observer.1.observer_name=oemcli2 observer.1.observer_host=host2.us.oracle.com observer.1.observer_oracle_home=/scratch/oracle_base1/product/12.2.0/dbhome_1 observer.1.observer_host_cred_name=HOST2_CRED observer.1.observer_host_wallet_cred_name=WC2
emcli create_named_credential -cred_name=WC2 -cred_type=GenericPassword -auth_target_type='<system>' -attributes="GENERIC_PASSWORD:<Oracle Wallet Password>"
dg_configure_observers -stop
Stops the respective observer/observers for the Data Guard configuration associated with the specified primary database.
Format
emcli dg_configure_observers -stop -primary_target_name="<primary target name>" -primary_target_type="oracle_database|rac_database" [-observer_input_file="<full pathname of input file>"] [-stop_all] [-primary_db_creds_name="<primary database credential name>"] [-primary_host_creds_name="<primary database host credential name>"] [ ] indicates that the parameter is optional.
-
primary_target_name
Primary database Enterprise Manager target name. This can be either a single-instance database or a cluster database.
-
primary_target_type
Primary database target type. The allowed values are:-
oracle_database: Single instance database
-
rac_database: Cluster database
-
-
observer_input_file
The name of a file containing the information to stop the respective observers. The format of this file is as follows:observer.0.observer_name=<#1 observer name> observer.1.observer_name=<#2 observer name> observer.2.observer_name=<#3 observer name>
-
stop_all
Stops all the observers. This option cannot be used with -observer_input_file.
-
primary_db_creds_name
Primary database named credential for a user with SYSDBA or SYSDG role. Preferred credentials are used as the default values.
-
primary_host_creds_name
Primary database host named credential for an operating system user who can access the primary database Oracle home. Preferred credentials are used as the default values.
Example 1
emcli dg_configure_observers -stop -primary_target_name=database -primary_target_type=oracle_database -primary_db_creds_name=DB_CRED -primary_host_creds_name=HOST_CRED -observer_input_file=/scratch/stopObs.props The following is the content of /scratch/stopObs.props: observer.0.observer_name=oemcli1 observer.1.observer_name=oemcli2 observer.2.observer_name=oemcli3
Example 2
emcli dg_configure_observers -stop -primary_target_name=database -primary_target_type=oracle_database -primary_db_creds_name=DB_CRED primary_host_creds_name=HOST_CRED -stop_all
dg_configure_observers -setMaster
Configures the master observer for a Data Guard configuration associated with the specified primary database.
emcli dg_configure_observers -setMaster -primary_target_name="<primary target name>" -primary_target_type="oracle_database|rac_database" -master_observer_name=<name of the master observer> [-primary_db_creds_name="<primary database credential name>"] [-primary_host_creds_name="<primary database host credential name>"]
Options
-
primary_target_name
Primary database Enterprise Manager target name. This can be either a single-instance database or a cluster database.
-
primary_target_type
Primary database target type. The allowed values are:-
oracle_database: Single instance database
-
rac_database: Cluster database
-
-
master_observer_name
Name of the observer that is currently running and has to be configured as the master observer.
-
primary_db_creds_name
Primary database named credential for a user with SYSDBA or SYSDG role. Preferred credentials are used as the default values.
-
primary_host_creds_name
Primary database host named credential for an operating system user who can access the primary database Oracle home. Preferred credentials are used as the default values.
Example
The following example will set observer 'oemcli2' as the master observer for the Data Guard configuration associated with primary single-instance database 'database'.
emcli dg_configure_observers -setMaster -primary_target_name=database -primary_target_type=oracle_database -primary_db_creds_name=DB_CRED -primary_host_creds_name=HOST_CRED -master_observer_name=oemcli2
dg_configure_observers -show
Displays the list of observers configured for a Data Guard configuration associated with the specified primary database.
emcli dg_configure_observers -show -primary_target_name="<primary target name>" -primary_target_type="oracle_database|rac_database" [-primary_db_creds_name="<primary database credential name>"] [-primary_host_creds_name="<primary database host credential name>"]
Options
-
primary_target_name
Primary database Enterprise Manager target name. This can be either a single-instance database or a cluster database.
-
primary_target_type
Primary database target type. The allowed values are:-
oracle_database: Single instance database
-
rac_database: Cluster database
-
-
primary_db_creds_name
Primary database named credential for a user with SYSDBA or SYSDG role. Preferred credentials are used as the default values.
-
primary_host_creds_name
Primary database host named credential for an operating system user who can access the primary database Oracle home. Preferred credentials are used as the default values.
Example
The following example will list all the observers for the Data Guard configuration associated with primary single-instance database 'database'.
emcli dg_configure_observers -show -primary_target_name=database -primary_target_type=oracle_database -primary_db_creds_name=DB_CRED -primary_host_creds_name=HOST_CRED
dg_configure_observers -delete_alternate_observer
Deletes the Enterprise Manager alternate observer and its associated corrective action job. The Enterprise Manager alternate observer feature is not supported for database version 12.2 and higher.
emcli dg_configure_observers -delete_alternate_observer -primary_target_name="<primary target name>" -primary_target_type="oracle_database|rac_database" [-primary_db_creds_name="<primary database credential name>"] [-primary_host_creds_name="<primary database host credential name>"]
Options
-
primary_target_name
Primary database Enterprise Manager target name. This can be either a single-instance database or a cluster database.
-
primary_target_type
Primary database target type. The allowed values are:-
oracle_database: Single instance database
-
rac_database: Cluster database
-
-
primary_db_creds_name
Primary database named credential for a user with SYSDBA or SYSDG role. Preferred credentials are used as the default values.
-
primary_host_creds_name
Primary database host named credential for an operating system user who can access the primary database Oracle home. Preferred credentials are used as the default values.
Example
The following example will delete the Enterprise Manager alternate observer and its associated corrective action job for the Data Guard configuration associated with the primary single-instance database 'database'.
emcli dg_configure_observers -delete_alternate_observer -primary_target_name=database -primary_target_type=oracle_database -primary_db_creds_name=DB_CRED -primary_host_creds_name=HOST_CRED