Oracle Site Guard uses the Enterprise Manager Command Line Interface (EMCLI) to manage Oracle Site Guard configuration directly from the command line, or from batch programs or scripts. This chapter lists all of the EM CLI verbs used for configuring Oracle Site Guard:
Note:
EMCLI commands are case-sensitive. Ensure that you use the correct EMCLI verb, and enter the correct input.Note:
[]
indicates that the parameter is optional.
For more information about EMCLI, see Oracle Enterprise Manager Command Line Interface.
Associates new auxiliary hosts with a Site Guard system.
An auxiliary host can be any host that is not part of the system but is managed by Enterprise Manager Cloud Control. These hosts can be used to execute any script. Any other targets running on this host will not be part of Site Guard operation plan(s).
emcli add_siteguard_aux_hosts -system_name="system_name" -host_name="host_name"
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-system_name |
Specify the system on which you are performing the operation. |
-host_name |
One or more names of the host. This host must be managed by Enterprise Manager Cloud Control. |
Adds a named credential as a parameter for an Oracle Site Guard script. Values of user name and password of this credential can be accessed within the script.
emcli add_siteguard_script_credential_params -script_id="id_associated_with_the_script" -credential_name="name_of_the_credential" [-credential_owner="credential_owner"]
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-script_id |
Specify the script ID. |
-credential_name |
Specify the name of the credential. |
-credential_owner |
Specify the credential owner details. You need not specify the values of this parameter if the owner of the credential is same as that of the logged-in user. |
Adds a host to the Oracle Site Guard configuration scripts. You can add more than one host.
emcli add_siteguard_script_hosts -script_id="script_id" -host_name="host_name"
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-script_id |
Specify the identification associated with the script. |
-host_name |
Specify the host that you want to associate with the script. You can specify more than one host name. |
emcli add_siteguard_script_hosts -script_id="10" -host_name ="host1.domain.com"
Configures limit for Apply Lag and Transport Lag for all or selected databases of the system.
emcli configure_siteguard_lag -system_name="system_name" [-target_name="database_target_name"] -property_name="ApplyLag" or "TransportLag" -value="maximum_lag_limit_in_seconds"
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-system_name |
Specify the system on which you want to configure the threshold limit. |
-target_name |
Specify the database target name for which the threshold limit is configured. If this parameter is not specified, then the threshold value is applied to all databases of the system. |
-property_name |
Specify the property name. Valid values are ApplyLag and TransportLag . |
-value |
Specify the threshold value to be configured (in seconds). |
Creates an operational plan for Oracle Site Guard operations.
emcli create_operation_plan [-primary_system_name="name_of_primary_system"] [-standby_system_name="name_of_standby_system"] [-system_name="name_of_the_system"] [-operation="name_of_the_operation"] [-name="name_of_the_operation_plan"] [-role="role_associated_with_the_system"] [-like="name_of_the_operation_plan_from_which_the_steps_are_to_be_copied"
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-primary_system_name |
Specify the name of your system associated with the primary site. This option is used for switchover or failover operations. |
-standby_system_name |
Specify the name of your system associated with the standby site. This option is used for switchover or failover operations. |
-system_name |
Specify the name of the system. This option is used for start or stop operations. |
-operation |
Specify the function of the operation. Example: switchover , failover , start or stop . |
-name |
Specify the name of the operation plan. |
-role |
Specify the role associated with a system, when you run an operation (start or stop ). |
-like | Name of the operation plan from which the steps are to be copied. If this option is specified, system name, operation, and role are ignored. |
Example 7-5 Creating Operation Plan
emcli create_operation_plan -primary_system_name="austin" -standby_system_name="austin2" -operation="switchover" -name="austin-switchover-plan" emcli create_operation_plan -system_name="austin" -operation="start" -name="austin-start-plan" -role="Primary" emcli create_operation_plan -like="austin-start-plan" -name="austin-start-plan-copy"
Creates a site configuration for Oracle Site Guard.
emcli create_siteguard_configuration -primary_system_name="name_of_primary_system" -standby_system_name="name_of_standby_system"
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-primary_system_name |
Specify the name of the system that is associated with the primary site. |
-standby_system_name |
Specify the name of the system that is associated with the standby system. You can specify more than one option and one system name. |
Associates the credentials with the targets in a site.
emcli create_siteguard_credential_association -system_name="name_of_the_system" [-target_name="name_of_the_target"] -credential_type="type_of_credential" [-credential_name="name"] [–use_preferred_credential="true_or_false"] -credential_owner="owner"
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-system_name |
Specify the name of the system. |
-target_name |
Specify the name of the target. This parameter is optional. |
-credential_type |
Specify the type of the credential. Example: HostNormal , HostPrivileged , NodeManager , WLSAdmin , or DatabaseSysdba .
Note: For Node Manager credential, specify the |
-credential_name |
Specify the name of the credential.
If |
-credential_owner |
Specify the owner of the credential. |
–use_preferred_credential |
If you are using Preferred Credentials, then specify true . The default value is false . If you use the default value, then you must specify the -credential_name parameter to use named credentials. |
Example 7-7 Creating Site Guard Credential Association
emcli create_siteguard_credential_association -system_name="austin-system" -credential_type="HostNormal" -credential_name="HOST-SGCRED" -credential_owner="sysman" emcli create_siteguard_credential_association -system_name="austin-system" -credential_type="HostPrivileged" -use_preferred_credential="true" -credential_owner="sysman" emcli create_siteguard_credential_association -system_name="austin-system" -credential_type="HostNormal" -credential_owner="sysman" emcli create_siteguard_credential_association -system_name="austin-system" -target_name="austin-database-instance" -credential_type="DatabaseSysdba" -credential_name="HOST-DBCRED" -credential_owner="sysman"
Create scripts (Pre Script, Post Script and storage script) for the Oracle Site Guard configuration.
emcli create_siteguard_script -system_name=name_of_the_system -operation=name_of_the_operation -script_type=type_of_the_script [-host_name=name_of_the_host_where_the_scripts_are_run] -path=path_of_the_script [-component="path_of_the_entity_in_software_library"] [-runtime_script="flag_to_specify_if_prechecks_to_check_availability_of_this_script"] [-run_on=flag_specifying_the_host] [-all_hosts=flag_to_run_script_on_all_the_hosts_in_the_system] [-role=role_associated_with_the_system] [-credential_type=type_of_the_credential] [-credential_name="name_of_the_credential"] [-target_storage_credential_name=target_storage_credential] [-source_storage_credential_name=source_storage_credential] [-credential_owner=credential_owner]
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-system_name |
Specify the name of the system. |
-operation |
Specify the name of the operation. Name of the operation:
|
-script_type |
Specify the type of the script. It can be Mount , UnMount , Global-Pre-Script, Global-Post-Script, Pre Script , Post-Script , Storage-Failover , or Storage-Switchover . |
-host_name |
Specify the name of the host where this script will be executed.
This parameter is optional and can be specified more than once. |
-path |
Specify the path to the script. |
-component |
Specify the path to the entity in the software library. If component is specified, path should contain only the file name and its parameters.
This parameter is optional. |
-runtime_script |
Specify the value as true or false . If the script is designated as a runtime script, Precheck will not verify the existence of script. This parameter is used when the script is dynamically mounted or generated as part of execution of operation plan.
By default, all scripts staged from the software library are designated as runtime scripts. The default value for scripts that are not staged from software library is This parameter is optional. |
-run_on |
Specify whether the script needs to be executed on only one of the available hosts (enter any ) or on all hosts (enter all ).
This parameter is optional and default value is all. |
-all_hosts |
Optional flag to allow the script to run on all the hosts in the system. This parameter overrides the host_name . Enter true or false . |
-role |
Optional flag to configure script based on the system role. By default, the script is configured for both primary and standby roles for a given system. For example: Primary or Standby . |
–credential_type |
Specify HostNormal or HostPrivileged if you have root privileges. |
-credential_name |
Specify the name of the credential that is used to execute this script.
If the value for the parameter |
-target_storage_credential_name |
Specify the named credential for target storage. If target_storage_credential_name is specified then source_storage_credential_name and credential_owner must be specified. |
-source_storage_credential_name |
Specify the named credential for source storage. If source_storage_credential_name is specified then target_storage_credential_name and credential_owner must be specified. |
-credential_owner |
Specify the owner of the credential. If target_storage_credential_name and source_storage_credential_name are specified then the attribute credential_owner must be specified. |
Example 7-8 Creating Site Guard Script
emcli create_siteguard_script -system_name="austin-system" -operation="Switchover" -script_type="Precheck-Script" -role="Primary" -credential_type="HostNormal" -path="/tmp/precheckscript" -all_hosts="true" emcli create_siteguard_script -system_name="austin-system" -operation="Failover" -script_type="Post-Script" -role="Standby" -credential_name="MY_NAMED_HOST_CREDENTIAL" -path="/tmp/postscript" -host_name="host1.domain.com" -host_name="host2.domain.com" -run_on="any" -runtime_script="true" emcli create_siteguard_script -system_name="austin-system" -operation="Switchover" -script_type="Pre-Script" -credential_type="HostNormal" -path="stop_mycomponent.sh" -component="/Components/MyScripts/LCM_Operations" -all_hosts="true" -role="Primary" emcli create_siteguard_script -system_name="austin-system" -operation="Switchover" -script_type="Global-Pre-Script" -credential_type="HostNormal" -path="/tmp/prescript" -all_hosts="true" -target_storage_credential_name="SGCRED-TARGET-STORAGE" -source_storage_credential_name="SGCRED-SOURCE-STORAGE" -credential_owner="sysman"
Deletes the specified operation plan from an Oracle Site Guard configuration.
emcli delete_operation_plan
-name="name_of_operation_plan"
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-name |
Specify the name of the operation plan you want to delete. |
Delete any auxiliary host associated with the system.
emcli delete_siteguard_aux_host -system_name="system_name" [-host_name="name_of_the_host"]
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-system_name |
Specify the system on which you are performing the operation. |
-host_name |
The name of the host where the script will be run. This is an optional parameter. If it is not specified, then all auxiliary hosts associated with the system will be deleted.
Note: Ensure that the host name is part of the system specified in |
Deletes the Oracle Site Guard configuration. The entire configuration (scripts, credential associations, site associations, operation plans) pertaining to the specified system and all of the associated standby systems are deleted.
emcli delete_siteguard_configuration -primary_system_name="name_of_the_primary_system" -standby_system_name="name_of_the_standby_system" [-force="flag_specifying_whether_old_configurations_to_be_deleted"]
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-primary_system_name |
Specify the name of the primary system. |
-standby_system_name |
Specify the name of the standby system. This parameter is optional. However, if you do not specify this parameter, the Oracle Site Guard configuration of the specified primary system and all its standby system are deleted. |
-force |
Specify whether old configuration(s) need to be deleted. Enter either true or false .
This parameter is optional. |
Deletes the credential association from the Oracle Site Guard configuration.
emcli delete_siteguard_credential_association -system_name="name" [-target_name=["name"] -credential_type="type"
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-system_name |
Specify the system on which the service resides. |
-credential_type |
Specify the credential type. It can be HostNormal , HostPrivileged , NodeManager , WLSAdmin , or DatabaseSysdba . |
-target_name |
Specify the name of the target. This parameter is optional. |
Example 7-12 Deleting Site Guard Credential Association
emcli delete_siteguard_credential_association -system_name="austin-system" -credential_type="HostNormal" emcli delete_siteguard_credential_association -system_name="austin-system" -target_name="austin-database-instance" -credential_type="DatabaseSysdba"
Deletes values of Apply Lag and Transport Lag threshold configured for one or more Data Guard enabled databases of the system.
emcli delete_siteguard_lag -system_name="system_name" [-target_name="database_target_name"] -property_name="lag_type"
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-system_name |
Specify the system for which you want to configure the threshold limit. |
-target_name |
Specify the database target name for which the threshold limit is configured. If this parameter is not specified, then the threshold value is applied to all databases of the system. This parameter is optional. |
-property_name |
Specify the property name. Valid values are ApplyLag and TransportLag . |
Deletes the specified script from the Oracle Site Guard configuration.
emcli delete_siteguard_script
-script_id="script id"
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-script_id |
Specify the ID associated with the script. |
Deletes a named credential that is a parameter to a Oracle Site Guard script. Values of the user name and password of this credential can be accessed within the script.
emcli delete_siteguard_script_credential_params -script_id="Id associated with the script" [-credential_name="name of the credential"] [-credential_owner="credential owner"]
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-script_id |
Specify the ID associated with the script. |
-credential_name |
Specify the name of the credential. If this argument is not specified, all credentials associated with the script will be deleted.
This parameter is optional. |
-credential_owner |
Specify the owner of the credential. This parameter need not be specified if the owner of the credential is the same as the logged-in user. |
Example 7-15 Deleting Site Guard Script Credential Parameters
emcli delete_siteguard_script_credential_params -script_id="1" -credential_name="NAMED_CREDENTIAL_X" emcli delete_siteguard_script_credential_params -script_id="2" -credential_name="NAMED_CREDENTIAL_Y" -credential_owner="SG_ADMIN" emcli delete_siteguard_script_credential_params -script_id="3"
Deletes the host or hosts associated with a given script.
emcli delete_siteguard_script_hosts -script_id="script id" -host_name="host_name"
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-script_id |
Specify the ID associated with the script. |
-host_name |
Specify the name of the host where this script will be executed.
This parameter can be specified more than once. |
Provides the detailed step-by-step information about the specified operation plan.
emcli get_operation_plan_details
-name="plan_name"
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-name |
Specify the name of the operation plan. |
Lists all configured operation plans.
emcli get_operation_plans [-name="name_of_the_operation_plan"]
[-operation="type_of_operation"]
[-system_name="name_of_the_system"]
[-primary_system_name="name_of_the_primary_system"]
[-standby_system_name="name_of_the_standby_system"]
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-name |
Specify the name of the operation plan. |
-operation |
Specify the name of the operation. For example, switchover , failover , start , or stop .
This is an optional parameter. If you do not specify this parameter, then all the operation plans will be listed. |
-system_name |
Specify the name of system used in the operation plan. If you specify these values, then the values for -primary_system_name and -standby_system_name need not be specified. |
-primary_system_name |
Specify the name of primary system used in the operation plan. You can specify the values of this parameter instead of the values of -system_name . The -standby_system_name parameter can also be additionally used for better filtering. |
-standby_system_name |
Specify the name of the standby system used in the operation plan. You can specify the values of this parameter instead of the values of -system_name . The -primary_system_name parameter can also be additionally used for better filtering. |
Example 7-18 Obtaining Operation Plans
emcli get_operation_plans -operation="switchover" -system_name="austin-system" emcli get_operation_plans -operation="switchover" -primary_system_name="austin-system" emcli get_operation_plans -operation="failover" -standby_system_name="austin2-system" emcli get_operation_plans -name="austin-switchover-plan" -system_name="austin-system"
Output Columns
Plan name, Operation name, Primary System Name, Standby System Name, Created On
Get a list of all auxiliary hosts associated with the system.
emcli get_siteguard_aux_hosts
-system_name="system_name"
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-system_name |
Specify the system on which you are performing the operation. |
Provides the Oracle Site Guard configuration.
emcli get_siteguard_configuration [-primary_system_name="name_of_the_primary_system"] [-standby_system_name="name_of_the_standby_system"]
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-primary_system_name |
Specify the name of the primary system. |
-standby_system_name |
Specify the name of the standby system. |
Output Columns
Primary System, Standby System(s)
Lists the credential associations configured for a system.
emcli get_siteguard_credential_association -system_name="name_of_the_system" [-target_name="name_of_the_target"] [-credential_type="type_of_the_credential"]
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-system_name |
Specify the name of the system. |
-target_name |
Specify the name of the target. This parameter is optional. |
-credential_type |
Specify the type of the credential. It can be HostNormal , HostPrivileged , NodeManager , WLSAdmin , or DatabaseSysdba .
Note: For Node Manager credential type, specify the This parameter is optional. |
Output Columns
Target Name, Credential Name, Credential Type
Example 7-21 Obtaining Site Guard Credential Association
emcli get_siteguard_credential_association -system_name="austin-system" -credential_type="HostNormal" emcli create_siteguard_credential_association -system_name="austin-system" -target_name="austin-database-instance" -credential_type="DatabaseSysdba"
Displays schedule of health checks for an operation plan.
emcli get_siteguard_health_checks
-operation_plan="name_of_the_operation_plan"
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-operation_plan |
Specify the name of the operation plan for which schedule of health checks has to be displayed. |
Retrieves and shows configured limit for ApplyLag
and TransportLag
for all or selected databases of the system.
emcli get_siteguard_lag -system_name="name_of_the_system" [-target_name="database_target_name"] -property_name="lag_type"
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-system_name |
Specify the name of the system. |
-target_name |
Specify the name of the database. |
-property_name |
Specify the name of the property. Valid values are ApplyLag and TransportLag . |
Provides all the credential parameters for a Site Guard script.
emcli get_siteguard_script_credential_params -script_id="Id_associated_with_the_script" [-credential_name="name_of_the_credential"] [-credential_owner="credential_owner"]
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-script_id |
Specify the ID associated with the script. |
-credential_name |
Specify the name of the credential. If this argument is not specified, all credentials associated with the script will be deleted.
This parameter is optional. |
-credential_owner |
Specify the owner of the credential. This parameter need not be specified if the owner of the credential is the same as the logged-in user. |
Example 7-24 Getting Oracle Site Guard Script Credential Parameters
emcli get_siteguard_script_credential_params -script_id="1" -credential_name="NAMED_CREDENTIAL_X" emcli get_siteguard_script_credential_params -script_id="3" emcli get_siteguard_script_credential_params -script_id="3" -credential_owner="SG_ADMIN"
Lists the hosts associated with any script where the script is designated to run.
emcli get_siteguard_script_hosts
-script_id="script_id"
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-script_id |
Specify the ID associated with the script. |
Output Columns
Host Name
Obtains the Oracle Site Guard scripts associated with the specified system.
emcli get_siteguard_scripts -system_name="system_name" -operation="operation_name" -script_type="type_of_the_script" [-role="role_of_the_system"]
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-system_name |
Specify the name of the system. |
-operation |
Specify the name of the operation. For example, switchover , failover , start , or stop . |
-script_type |
Specify the type of the script. For example: mount , unmount , pre-script , post-script , global pre-script , global post-script , storage-failover , or storage-switchover . |
-role |
Optional parameter to filter the scripts based on the role associated with the system. For example: Primary or Standby . |
Output Columns
Script ID, Type, Operation, Path, Role
Get the list of all Oracle Site Guard supported targets of the system.
emcli get_siteguard_supported_targets -system_name={system name} [-target_type={target type}]
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-system_name |
Specify the name of the system. |
-target_type |
Specify the type of the target. This is an optional parameter. |
emcli get_siteguard_supported_targets -system_name="austin-system" emcli get_siteguard_supported_targets -system_name="austin-system" -target_type="weblogic" emcli get_siteguard_supported_targets -system_name="austin-system" -target_type="database"
Run the Oracle Site Guard Prechecks for any given operation plan.
emcli run_prechecks
-operation_plan="name_operation_plan"
[-database_lag_checks="true"|"false"]
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-operation_plan |
Specify the name of the operation plan. |
-database_lag_checks |
Run database lag checks as part of Prechecks for all Data Guard configured databases. Enter value true or false .
This parameter is optional. |
Schedules health checks for an operation plan.
emcli schedule_siteguard_health_checks
-operation_plan={name of the operation plan}
-schedule=
{
start_time:yyyy/MM/dd HH:mm;
[tz:{java timezone ID};
[frequency:interval/weekly/monthly/yearly;]
[repeat:tx;]
[end_time:yyyy/MM/dd HH:mm;]
[grace_period:xxx;]
}
[-notify="flag_specifying_whether_email_notifications_to_be_sent"]
[-email="email_address_to_be_notified"]
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-operation_plan |
Specify the name of the operation plan for which health checks have to be scheduled. |
-schedule |
Specify schedules at which health checks have to be scheduled.
If If If
If not specified, health checks will run indefinitely.
If the value are set to |
-database_lag_checks |
Run database lag checks as part of Prechecks for all Data Guard configured databases. This parameter is optional.
The default value is |
-notify |
Specify whether you want to be notified about the health-check report.
If set to This parameter is optional. |
-email |
Specify the email address that needs to be used for notification of health-check report. This email address must be a configured email address for the current user.
This parameter is optional. |
Example 7-29 Scheduling Oracle Site Guard Health Checks
emcli schedule_siteguard_health_checks -operation_plan="austin-switchover" -schedule="start_time:2014/06/10 15:45" emcli schedule_siteguard_health_checks -operation_plan="austin-switchover" -schedule="start_time:2014/10/29 2:00;frequency:interval;repeat:1d" emcli schedule_siteguard_health_checks -operation_plan="austin-failover" -schedule="start_time:2014/08/10 01:00;frequency:interval;repeat:1w" emcli schedule_siteguard_health_checks -operation_plan="austin-failover" -schedule="start_time:2014/08/10 1:00;frequency:weekly;days:6,7;grace period:60;tz:America/New_York"
Stops all future health check executions of an operation plan.
emcli stop_siteguard_health_checks
-operation_plan="name_of_the_operation_plan"
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-operation_plan |
Specify the name of the operation plan for which health check executions has to be stopped. |
Submits the specified operation plan for execution.
emcli submit_operation_plan -name="name_of_operation_plan" [-run_prechecks="true | false"] [-stop_primary="flag_specifying_whether_primary_site_to_be_stopped_during_failover"] [-database_lag_checks="true"|"false"]
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-name |
Specify the name of the operation plan. |
-run_prechecks |
Specify the run_prechecks value (true or false ).
By default, the value of this parameter is If you set the value to |
-stop_primary |
Specify whether to stop targets on primary site during a Failover operation. Set value true or false . |
-database_lag_checks |
Run database lag checks as part of Prechecks for all Data Guard configured databases. This parameter is optional.
The default value is |
Updates the Error Mode and Run Mode for any step in the given operation plan.
emcli update_operation_plan -name="operation_plan_name" -step_number="step_number" -target_host="host_name" -target_name="target_name" [error_mode="error_mode"] [enabled="true" or "false"] [-execution_mode="Serial" or "Parallel"] [-move="up"or"down"] [-delete="true" or "false"]
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-name |
Specify the name of the operation plan. |
-step_number |
Specify the number of the step that should be updated. |
-target_host |
Specify the name of the system. Specifying this will update all the steps related to this target host. |
-target_name |
Specify the database target name. |
-error_mode |
The function of the operation. For example: stop or continue . |
-enabled |
Enter true or false . |
-execution_mode |
Specify the execution mode. For example: Serial or Parallel |
-move |
Change the order by specifying Up or Down . |
-delete | Specify whether you want to delete steps. Specify true or false . |
Example 7-32 Updating an Operation Plan
emcli update_operation_plan -name="austin-switchover" -step_number="1" -error_mode="Continue" -enabled="true" -execution_mode="Serial" emcli update_operation_plan -name="austin-switchover" -step_number="5" -move="Up" emcli update_operation_plan -name="austin-switchover" -target_host="myhost.domain.com" -error_mode="Continue" -enabled="true" emcli update_operation_plan -name="example-switchover" -target_name="/Farm1/MyDomain" -delete="true"
Updates the Oracle Site Guard configuration to add additional standby systems. One primary system can be associated with one or more standby systems.
emcli update_siteguard_configuration -primary_system_name="primary_system_name"] -standby_system_name="standby_system_name"] [-reverse_role="flag_specifying_whether_system_roles_to_be_reversed"]
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-primary_system_name |
Specify the name of the primary system. |
-standby_system_name |
Specify the name of the standby system. This parameter can be specified more than once. |
-reverse_role |
Specify whether to reverse role of site from standby to primary. Enter true or false .
If this option is specified, only one standby system name can be submitted using parameter |
Updates the credential association.
emcli update_siteguard_credential_association -system_name="name_of_the_system" [-target_name="name_of_the_target"] -credential_type="type_of_the_credential" [-credential_name="name_of_the_credential"] [–use_preferred_credential="true_or_false"] -credential_owner="credential_owner"
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-system_name |
Specify the name of the system. |
-target_name |
Specify the name of the target. This parameter is optional. |
-credential_type |
Specify the type of the credential. It can be HostNormal , HostPrivileged , WLSAdmin , or DatabaseSysdba . |
-credential_name |
Specify the name of the credential. |
–use_preferred_credential |
If you are using Preferred Credentials, then specify true . The default value is false . If you specify the default value, then you must specify the -credential_name parameter to use named credentials. |
-credential_owner |
Specify the owner of the credential. |
Example 7-34 Updating Site Guard Credential Association
emcli update_siteguard_credential_association -credential_type="HostNormal" -credential_name="HOST-SGCRED" -credential_owner="sysman" emcli update_siteguard_credential_association -credential_type="HostPrivileged" -use_preferred_credential="true" -credential_owner="sysman"
emcli update_siteguard_credential_association -target_name="austin-database-instance" -credential_type="DatabaseSysdba" -credential_name="HOST-DBCRED" -credential_owner="sysman"
Updates the values of Apply Lag and Transport Lag threshold for one or more Data Guard enabled databases of the system.
emcli update_siteguard_lag -system_name="system_name" [-target_name="database_target_name"] -property_name="lag_type" -value="max_limit"
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-system_name |
Specify the system for which you want to configure the threshold limit. |
-target_name |
Specify the database target name for which the threshold limit is configured. If this parameter is not specified, then the threshold value is applied to all databases of the system. |
-property_name |
Specify the property name. Valid values are ApplyLag and TransportLag . |
-value |
Specify the threshold value to be updated (in seconds). |
Updates the path and the all_hosts
flag associated with any script.
emcli update_siteguard_script -script_id="ID_associated_with_the_script" -path="path_of_the_script" [-component="path of the entity in Software library"] -runtime_script="flag_to_specify_if_prechecks_to_check_availability_of_the_script" –credential_type="type_of_credential" [-host_name="name_of_the_host_where_this_script_will_run"] [-run_on="flag_specifying_the_host"] [-all_hosts="true" or "false"] [-target_storage_credential_name="target_storage_credential"] [-source_storage_credential_name="source_storage_credential"] [-credential_owner="credential_owner"]
Note:
[]
indicates that the parameter is optional or conditionally optional.Parameter | Description |
---|---|
-script_id |
Specify the script ID. |
-path |
Specify the path to the script. |
-component |
Specify the path to the entity in the software library. If the values for this parameter are specified, the path should contain only the file name and its parameters. |
-runtime_script |
Specify whether the script is a runtime script. If a script is designated as a runtime script, Precheck does not verify the script. This option can be used when the script is dynamically mounted or generated as part of execution of an operation plan.
By default, all scripts staged from the software library are designated as runtime scripts. The default value for scripts that are not staged from the software library, is |
–credential_type |
Specify HostNormal or HostPrivileged if you have root privileges. |
-credential_name |
Specify the name of the credential. If no value is specified, then the values for the parameter credential_type must be specified. |
-host_name |
Name of the host where this script will be run.
This parameter is optional and can be specified more than once. |
-run_on |
Specify whether the script needs to be executed on only one of the available hosts (any ) or on all hosts (all ).
This parameter is optional and default value is |
-all_hosts |
Optional flag to allow the script to run on all the hosts in the system. For example: true or false . |
-target_storage_credential_name |
Specify named credential for target storage.
If |
-source_storage_credential_name |
Specify named credential for source storage.
If |
-credential_owner |
Specify owner of the credential.
If |
Example 7-36 Updating Site Guard Script
emcli update_siteguard_script -script_id="10" -path="/tmp/script" -all_hosts="true" emcli update_siteguard_script -script_id="10" -path="stop_mycomponent.sh" -component="/Components/MyScripts/LCM_Operations" -all_hosts="true" emcli update_siteguard_script -script_id="10" -host_name="host1.domain.com" -host_name="host2.domain.com" -run_on="any" emcli update_siteguard_script -script_id="10" -all_hosts="false" -credential_name="MY_NAMED_HOST_CREDENTIAL" -host_name="host1.domain.com" emcli update_siteguard_script -script_id="16" -path="/tmp/script" -credential_type="HostPrivileged" -runtime_script="true" emcli update_siteguard_script -script_id="20" -path="/tmp/script" -all_hosts="true" -target_storage_credential_name="SGCRED-TARGET-STORAGE" -source_storage_credential_name="SGCRED-SOURCE-STORAGE" -credential_owner="sysman"