maintain_db_ha -maintainBackupConfigToRA

Performs maintenance on databases configured via Enterprise Manager to send backups and real-time redo to a Recovery Appliance, including updating the virtual private catalog user password and trusted certificates in the backup wallet when applicable.

Format

emcli maintain_db_ha -maintainBackupConfigToRA
            [
                (
                    -target_name="<database or group target name>"
                    -target_type="oracle_database|rac_database|composite"
                )
                | -input_file="<full path name of input file>"
            ]
            [-db_cred="<database target named credential>"]
            [-db_host_cred="<database host target named credential>"]
            [-wallet_cred="<named credential containing wallet credentials for a password-protected wallet>"]
            [-schedule=
                {
                    start_time:yyyy/MM/dd HH:mm;
                    tz:{java timezone ID};
                    frequency:interval/weekly/monthly/yearly;
                    repeat:#m|#h|#d|#w;
                    months:#,#,...;
                    days:#,#,...;
                    end_time:yyyy/MM/dd HH:mm;
                }
            ]
[ ]  indicates that the parameter is optional.

Options

For each parameter, it is noted whether the argument is required (either on the command line or in the input file), what the default is if it is not required, and whether it can be specified for individual targets in an input file (that is, whether the parameter can be set on a per-database or per-group basis when the command is run against multiple databases or groups).

Required arguments can be specified either on the command line or in an input file. When an input file is used, command line values globally apply to all targets listed in the input file, while per-target values specified in the input file override the corresponding command line values.

The following conventions are used for the attribute values in the argument descriptions:

  • Required: Whether the argument is required on the command line or in an input file, and under what conditions.
  • Default: For optional arguments, the default value.
  • Scope:
    • Command Line Only: The argument can be specified only on the command line, not in an input file, and applies globally to all database targets.
    • Input File Only: The argument can be specified only in the input file at the per-target level.
    • Both: The argument can be specified on the command line, in the input file, or in both places. If specified in both places, the input file value overrides the command line value.
  • target_name="<database or group target name>"

    Enterprise Manager target name of a single-instance database or cluster database that will be maintained, or a group for which all member databases will be maintained. A specific set of multiple databases can be maintained either by specifying a group target or by using the input_file option below.

    • Required: No
    • Default: If targets are not specified on the command line or in the input file, all database targets configured in Enterprise Manager to send backups and redo logs to a Recovery Appliance are maintained.
    • Scope: Both
  • target_type="oracle_database|rac_database|composite"

    Target type corresponding to the target specified by target_name. Allowed target types are oracle_database, rac_database, and composite.

    • Required: Only if target_name is specified
    • Scope: Both
  • input_file="target_list:<full pathname of input file>"

    A file containing information for multiple databases or group targets. This is an alternative that can be used when there are multiple but not all databases to be maintained. The entries in the file mirror the command line parameters.

    • Required: No

    The format of this file is as follows:

    • target_name and target_type are required for each database or group.
    • The following parameters are optional: db_cred, db_host_cred, and wallet_cred. They can be specified for some or all of the targets. If an option is not specified for a particular target, values specified on the command line for that option will be used for that target. If an option is present in both the input file and command line, the input file value overrides the command line value.

    Input file format:

    target.0.target_name="<database #1 target name or group target name>"
    target.0.target_type=<oracle_database|rac_database|composite>
    target.0.db_cred="<database named credential for database #1 or common credential for all databases in group target>"
    target.0.db_host_cred="<database host named credential for database #1>"
    target.1.target_name="<database #2 target name or group target name>"
    target.1.target_type=<oracle_database|rac_database|composite>
    target.1.db_cred="<database named credential for database #2>"
    target.1.db_host_cred=<database host named credential for database #2>
    target.1.wallet_cred="<named credential containing wallet credentials for a password-protected backup wallet for database #2>"
  • db_cred="<database target named credential>"

    The name of an existing Enterprise Manager database named credential for a SYSDBA or SYSBACKUP role user that can be used to connect to all target databases that will be maintained. If multiple databases are being maintained, this should be a global named credential.

    • Required: No
    • Default: Preferred database credentials for the database target type.
    • Scope: Both
  • db_host_cred="<database host target named credential>"

    The name of an existing Enterprise Manager database host named credential that can be used to run operating system commands on the target database hosts. The credential should be for a user that has write permission for all Oracle homes. If multiple databases are being maintained, this should be a global named credential.

    • Required: No
    • Default: Preferred host credentials for the database target type.
    • Scope: Both
  • wallet_cred="<named credential containing wallet credentials for a password-protected wallet>"

    Named credential used to update the existing password-protected wallet with the new Recovery Appliance virtual private catalog user credentials used to connect to the Recovery Appliance.

    • Required: Yes, if the SBT wallet is password-protected.
    • Scope: Both
  • schedule

    Schedules the deployment procedure. If this argument is not provided, the procedure runs immediately.

    • Required: No
    • Default: Schedule the procedure for immediate execution.
    • Scope: Command Line Only

    Sub-arguments:

    • start_time: Time when the procedure starts. Format: yyyy/MM/dd HH:mm.
    • tz: The time zone ID. (Optional)
    • frequency: Valid values are interval, weekly, monthly, and yearly. (Optional)
    • repeat: Frequency with which the procedure has to be repeated. Required only if frequency is set to interval.
    • days: Comma-separated list of days. Required when frequency is weekly, monthly, or yearly. If frequency is weekly, valid range is 1 to 7. If frequency is monthly or yearly, valid range is 1 to 30.
    • months: Comma-separated list of months. (Required only if frequency is yearly).
    • end_time: End time for procedure executions. If it is not specified, the procedure runs indefinitely. The format is yyyy/MM/dd HH:mm.

Examples

Example 1

Updates wallets of all target databases that are configured to send backup and redo to a Recovery Appliance, either using a Virtual Private Catalog whose credentials were recently modified in Enterprise Manager or using TCPS connections whose trusted certificates were recently modified in Enterprise Manager.

emcli maintain_db_ha -maintainBackupConfigToRA

Example 2

Updates wallets on a group of database targets for which preferred credentials are not set, but all databases in the group have the same credentials.

emcli maintain_db_ha -maintainBackupConfigToRA 
   -target_name="grp1"
   -target_type=composite
   -db_cred="sysCred"
   -db_host_cred="orclHCred"