upgrade_agents

Performs Agent upgrade prerequisites and submits the Agent upgrade job.

Format

emcli upgrade_agents
     -agents="full_agent_name"|-input_file="agents_file:location_of_output_file" 
     [-validate_only] 
     [-pre_script_loc] 
     [-post_script_loc] 
     [-pre_script_on_oms] 
     [-post_script_on_oms]  
     [-stage_location] 
     [-job_name]
     [-override_credential]
     [-additional_parameters]

[ ]  indicates that the parameter is optional

Options

Note:

Either the -agents or -input_file parameter is mandatory. If you provide both, the union of both are taken, prerequisites are performed on the Agents, and an Agent upgrade job is submitted.

You can pass all of these parameters in a response file. Usage: -input_file="response_file:/scratch/response_file.txt" . A file name with the full path must be provided, and each parameter should be specified in each line. If a parameter/flag is passed both in the command line and in a response file, the command-line option is given precedence. A parameter should be specified as a name-value pair in the response file. For example: job_name=UPGRADE_AGT_121020

  • agents

    Checks whether the specified Agents specified are upgradable, and submits an Agent upgrade job.

  • input_file

    Checks whether the Agents specified in file are upgradable, and submits an Agent upgrade job.

    For more information about the input_file parameter, see -input_file Syntax Guidelines.

  • validate_only

    Checks only whether Agents specified are upgradable. An Agent upgrade job will not be submitted.

  • pre_script_loc

    Executes this script before upgrading the Agent.

  • post_script_loc

    Executes this script after upgrading the Agent.

  • pre_script_on_oms

    Use if pre-script is treated to be on OMS.

  • post_script_on_oms

    Use if post-script is treated to be on OMS.

  • stage_location

    Passes a custom staging location used by the Agent upgrade job.

  • job_name

    Submits the job with this name.

  • override_credential

    Preferred credential of the Oracle home of the Agent used to run root.sh. Use this option to override this and use a named Oracle home credential.

  • additional_parameters

    Passes additional parameters to the Agent upgrade job.

Examples

Example 1

This example checks whether the Agents matching pattern abc% and xyz.example.com:1243 are upgradable, then submits the Agent upgrade job.

emcli upgrade_agents -agents="abc%,xyz.example.com:1243"

Example 2

This example checks whether Agents in the file are upgradable, then submits the Agent upgrade job.

emcli upgrade_agents -input_file="agents_file:/scratch/agents_file.txt"