switch_gi

This command switches the Grid Infrastructure Oracle homes to the selected target.

Format

emcli switch_gi 
–input_file_loc=”path of input file”  
-dest_oh=<path of new Gold image based Grid Infrastructure Oracle home> 
-host_creds=<Normal Named host credential> 
-privilege_creds=<Named credential with root privileges>

Options

  • input_file_loc: Input file path location

  • target_name: Database target name which needs to be switched.

  • target_type:
    • For SIHA: “has”

    • For cluster: “cluster”

  • dest_oh: Path of new Oracle home where the database needs to be switched to.

  • host_creds: Named credentials for the Oracle home owner on the host following “<Named Credentials>:<Owner>”

    The “Owner” field is the owner of the named credential in Enterprise Manager.

    If no “Owner” is specified, the logged-in user is taken by default.

  • privilege_creds: Named credentials on the database host which has root privileges.

Note:

If database names are provided in the command line, input file will not be used.

If input file is specified, for each database, the inputs in the response file override the one in the command line.

In case the preferred credentials are set for the host, users can choose not to provide “host_creds” and “privilege_creds” as part of EMCLI command (or input file).

We have a validation in initialize DP step for the same. If credentials are not provided as part of emcli and also the preferred credentials are not set, the DP will error out without any processing.

Example 5-3 Examples

This example demonstrates how to switch multiple targets.

emcli switch_gi 
–target_name=<Cluster target name>[,<Cluster target name2>]* 
-target_type=<cluster|has> 
-dest_oh=<path of new Gold image based Grid Infrastructure Oracle home> 
-host_creds=<Normal Named host credential> 
-privilege_creds=<Named credential with root privileges>