db_software_maintenance

Image and Subscriptions

createImage

Description

Creates a new image.

Format

emcli db_software_maintenance -createImage
  -image_name= "<image_name>"
  -description= "<description>"
  -type= "<type>"
  -target_type= "<target_type>"
  -version= "<version>" 
  -platform_id= "<platform_id>"
  -status= "<status>"

Options

  • image_name

    The name of the image.

  • description

    The description of the image.

  • type

    The type of the image, for example SWLIB if the image version will be in the Software Library.

  • target_type

    The target type of the image. For example, if the image is being created to manage single instance Oracle Database then the target type is oracle_database.

  • version

    The RDBMS version of the product, for example 11.2.0.4.0.

  • platform_id

    The platform id, for example 226 for Linux x86_64.

  • status

    The image status, for example PRODUCTION.

Examples

The following example creates a new image with the name GI_11204.

emcli db_software_maintenance -createImage
  -image_name="GI_11204" 
  -description="GI_11204" 
  -type="SWLIB" 
  -target_type=cluster -version=11.2.0.4.0 
  -platform_id=226 -status=PRODUCTION 

getImages

Description

Returns the list of available images which are created in the cloud flow. Images which failed or are inactive won't appear on the list. For Exadata patching use getImages to obtain both the SeriesID and FPP_IMAGE_ID.

Format

emcli db_software_maintenance -getImages
[-all]

Options

  • all

    Lists all available images.

Examples

The following example returns a list of images present in production.

emcli db_software_maintenance -getImages

To get a list of all created images, use the -all parameter:

emcli db_software_maintenance -getImages -all

deleteImage

Description

Deletes an image.

Format

emcli db_software_maintenance -deleteImage            
  -image_id= "<image_id>"
  [-force= "<force>"]
  [-reportOnly="<true/false>"]

[ ]  indicates that the parameter is optional.
  • image_id

    The ID of the image to be deleted.

  • force

    Deletes forcibly even if the image has subscribed targets.

  • reportOnly

    This is used when the user wishes to view candidates for deletion, but does not want to perform the actual delete operation.

Examples

The following example deletes the image with the ID 01B5F14FD57D7B89E05313B2F00A739F.

emcli db_software_maintenance -deleteImage 
  -image_id="01B5F14FD57D7B89E05313B2F00A739F

subscribeTarget

Description

Creates new target or modifies the target subscription.

Format

emcli db_software_maintenance -subscribeTarget      
  -target_name= "<target_name>"
  -target_type= "<target_type>"
  -[parent_target_name= "<parent_target_name>"]
  -[parent_target_type= "<parent_target_type>"]
  -image_id= "<image_id>"
  -[version_id= "<version_id>']
  -[standbyAutoSubscribe=<true|false>]

[ ]  indicates that the parameter is optional.

Options

  • target_name

    The name of the target.

  • target_type

    The type of target being provided in this operation

    For Oracle Database operations:
    • rac_database
    • oracle_database
    For Exadata operations:
    • oracle_exadata
    • oracle_si_netswitch
    • Database node (host)
  • parent_target_name

    The parent target name.

  • parent_target_type

    The parent target type.

  • image_id

    The image id.

  • version_id

    The version id.

  • standbyAutoSubscribe

    For Data Guard only, values are true/false

Examples

The following example modifies the Oracle Cloud Zone target POOL NAME.

emcli db_software_maintenance -subscribeTarget
  -target_name="POOL NAME" 
  -target_type=oracle_cloud_zone 
  -image_id=FE55AD7AB28974EFE04313B2F00AD4A0

Dataguard Subscription examples

The following databases are used for these examples:
  • orcl1913 : Primary DB
  • orcl19131: Standby
Subscribe primary and standby databases together:
emcli db_software_maintenance -subscribeTarget
-target_name=orcl1913
-target_type=oracle_database
-image_id=F8FA65CA06916523E05324124B6447BA
Subscribe only the primary database:
emcli db_software_maintenance -subscribeTarget 
-target_name=orcl1913
-target_type=oracle_database 
-image_id=F8FA65CA06916523E05324124B6447BA
-standbyAutoSubscribe=false
Subscribe only the standby database
emcli db_software_maintenance -subscribeTarget 
-target_name=orcl19131
-target_type=oracle_database
-image_id=F8FB28A8E5A5381FE05324124B64A0FA

Exadata Subscribe Examples

Storage
emcli db_software_maintenance -subscribeTarget
-target_type="oracle_exadata" 
-target_list="exadatast1.example.com,exadatast2.example.com"
 -image_id="148AFC66D2523DDDE063DF034B64E36F"
Switch
emcli db_software_maintenance -subscribeTarget
-target_type="oracle_si_netswitch" 
-target_list="exaswitch1.example.com,exaswitch2.example.com"
-image_id="148AFC66D2523DDDE063DF034B64E36F"
Database node (host)
emcli db_software_maintenance -subscribeTarget 
-target_type="host"
-target_list="exahost1.example.com,exahost2.example.com"
-image_id="148AFC66D2523DDDE063DF034B64E36F"

describeImage

Description

Returns the list of patches and bugs of an image. It shows the current version of the given image by default unless a specific version_id is provided.

Format

emcli db_software_maintenance –describeImage –image_id=<Image Id> [-version_id=<version id>] [-bugs=<true|false>]

Options

  • image_id

    The ID of the image to be searched for patches

  • version_id

    Version id number.

  • bugs

    True/False, default is false. When set to true lists the bugs associated with the image.

Examples

The following example returns a description of patches present in an image.

emcli db_software_maintenance –describeImage –image_id=83727129537

The following example returns a description of patches present in an image, adding the bugs flag will also list all associated bugs.

emcli db_software_maintenance –describeImage –image_id=8372712953 -bugs=true

getTargetSubscriptions

Description

Returns a list of subscriptions for the specified target.

Format

emcli db_software_maintenance -getTargetSubscriptions
  -target_name= "<target_name>"
  -target_type= "<target_type>"
  [-image_type= "<image_type>"] 

[ ]  indicates that the parameter is optional.
  • target_name

    The name of the target.

  • target_type

    The target type.

  • image_type

    The image type.

Examples

The following example returns a list of subscriptions for the Oracle Cloud Zone target with the name POOL NAME.

emcli db_software_maintenance -getTargetSubscriptions
  -target_name="POOL NAME" 
  -target_type="oracle_cloud_zone"

unsubscribeTarget

Description

Unsubscribes the specified target.

Format

emcli db_software_maintenance -subscribeTarget      
  -target_name= "<target_name>" 
  -target_type= "<target_type>"
  -image_id= "<image_id>" 
  [-version_id= "<version_id>']

[ ]  indicates that the parameter is optional.
  • target_name

    The name of the target.

  • target_type

    The target type.

  • image_id

    The image id.

  • version_id

    The version id.

Examples

The following example unsubscribes a database with the name DB_Sample1 and the image ID FE55AD7AB28974EFE04313B2F00AD4A0.

emcli db_software_maintenance -unsubscribeTarget
  -target_name="DB_Sample1"
  -target_type=oracle_database
  -image_id=FE55AD7AB28974EFE04313B2F00AD4A0

Exadata Examples

The following example unsubscribe different Exadata target types

  • Storage
    emcli db_software_maintenance -unsubscribeTarget
      -target_name="EXADATA_Sample1"
      -targetType="oracle_exadata"
      -image_id=FE55AD7AB28974EFE04313B2F00AD4A0
  • Swtich
    emcli db_software_maintenance -unsubscribeTarget
      -target_name="Switch_Sample1.example.com"
      -targetType="oracle_si_netswitch"
      -image_id=FE55AD7AB28974EFE04313B2F00AD4A0
  • Host (DB node)
    emcli db_software_maintenance -unsubscribeTarget
      -target_name="host_Sample1.example.com"
      -targetType="host"
      -image_id=FE55AD7AB28974EFE04313B2F00AD4A0

createSoftwareImage

Description

Creates a new software image for the specified the Oracle home. The createSoftwareImage verb either takes data from a text file or uses the getInputVariableList command.

Format

emcli db_software_maintenance -createSoftwareImage
[-input_file="data:<file_location>"]
[-getInputVariableList= "getInputVariableList"]
[-workDir= "Work Directory Location"]

[ ]  indicates that the parameter is optional.

Options

  • input_file

    The path of the txt input file in the format: data:input_file_path

  • getInputVariableList

    Provides the list of variables to be specified in the input file.

  • workDir

    Specify the working directory to be used. This is an optional parameter.

Examples

List All Parameters Inside an Input file

To get the list of all of the parameters to be passed inside the data file, run the following command:

emcli db_software_maintenance -createSoftwareImage
  -getInputVariableList=true

Create a New Image version

Run the following sample code to create a new image and a version.

emcli db_software_maintenance -createSoftwareImage 
  -input_file="data:/input_rac.txt"
Where the input file input_rac.txt will contain the following:
IMAGE_NAME=DbGoldImage
IMAGE_DESCRIPTION=Gold Image for 11g db
REF_TARGET_NAME=ORACLE_HOME
IMAGE_SWLIB_LOC=Oracle Home Provisioning Profiles/11.2.0.3.0/linux_x64
REF_HOST_CREDENTIALS=ZONE_CREDS:TESTSUPERADMIN
WORKING_DIRECTORY=/tmp
DESTN_SAME_AS_SRC=<True/False>
STORAGE_TYPE_FOR_SWLIB=OmsShared
STORAGE_NAME_FOR_SWLIB=swlib
VERSION_NAME=Version1

Exadata New Image Creation Examples

Run the following sample code to create a new image and a version.

emcli db_software_maintenance -createSoftwareImage 
-input_file="data:/scratch/user/fpp/fppgldimg.prop"
Where the input file will be one of the following:
Storage:
FPP_IMAGE_ID=1C3BAEBE500B3F67E063DF034B645208
VERSION_NAME=EMCLI_INSTALL_FEST_STORAGE_IMAGE_v01
IMAGE_VERSION=22.1.3.0.0
FPP_SERVER_HOST=emracr06.subnet.example.com
IMAGE_LOCATION=/mnt/patches/patches_22.1.3.0.0/storage_22.1.3.0.0.220914
WORKING_DIRECTORY=/tmp
REF_HOST_CREDENTIALS=NC_FPP_SERVER_CUSER:SYSMAN
IMAGE_DESCRIPTION=Image description for metadata
TARGET_TYPE=oracle_exadata
STORAGE_FILE=p34568888_221300_Linux-x86-64.zip
Switch
FPP_IMAGE_ID=1C3BAEBE500B3F67E063DF034B645208
VERSION_NAME=Exadata_switch_Series_2317_1
IMAGE_VERSION=22.1.19.0.0
FPP_SERVER_HOST=emracr02.subnet.example.com
IMAGE_LOCATION=/scratch/switch_231700
WORKING_DIRECTORY=/tmp
REF_HOST_CREDENTIALS=FPP_SERVER1:SYSMAN
IMAGE_DESCRIPTION=Image description for metadata
TARGET_TYPE=oracle_si_netswitch
SWITCH_FILE=p36261780_2311200_Linux-x86-64.zip
Database Node
FPP_IMAGE_ID=1C3BAEBE500B3F67E063DF034B645208
VERSION_NAME=Exadata_dbnode_Series_2317_1
IMAGE_VERSION=22.1.3.0.0.221207
FPP_SERVER_HOST=emracr02.subnet.example.com
IMAGE_LOCATION=/scratch/dbnode_231700
WORKING_DIRECTORY=/tmp
REF_HOST_CREDENTIALS=FPP_SERVER1:SYSMAN
IMAGE_DESCRIPTION=Image description for metadata
TARGET_TYPE=host
DBNODE_FILE=p36261778_2311200_Linux-x86-64.zip
PATCH_MANAGER_LOCATION=dbserver_patch_220810 

Note:

The patch manager zip file must be unzipped, and copied into the Computenode (domU) image folder.

searchImage

Description

Searches the image based on the filters provided. Use '%' for wildcards. If there is no filter specified, it returns all the images present in the system.

Format

emcli db_software_maintenance -searchImage
  [-name_pattern= "<name_pattern>"]
  [-version_pattern= "<version_pattern>"]
  [-description_pattern= "<description_pattern>"]
  [-owner= "<owner>"]
  [-target_type= "<target_type>"]
  [-platform_id= "<platform_id>"]

[ ]  indicates that the parameter is optional.
  • name_pattern

    The name pattern.

  • version_pattern

    The version pattern.

  • description_pattern

    The description pattern.

  • version_pattern

    The version pattern.

  • target_type

    The target type.

  • platform_id

    The platform id, for example 226 for Linux x86_64.

Examples

Example 1

The following example searches the database image for names that contain GI.

emcli db_software_maintenance -searchImage
  -name_pattern="%GI%"

Example 2

The following example searches the database image for platform id 226.

emcli db_software_maintenance -searchImage
  -platform_id="226"

createVersion

Description

Creates a new version in an existing image using an existing software library component.

Format

emcli db_software_maintenance -updateVersionStatus
  -version_name= "<version_name>"       
  -image_id= "<image_id>"       
  -external_id= "<external_id>"          
  -status= "<status>"  

Options

  • version_name

    The name of the version.

  • image_id

    The ID of the image.

  • external_id

    The external ID of the version. For example, it will be the Uniform Resource Name (URN) of the Software Library gold image.

  • status

    The status of the version, for example DRAFT, ACTIVE, CURRENT, RESTRICTED.

Examples

The following example creates a version Version1.

emcli db_software_maintenance -createVersion
  -version_name="Version1"
  -image_id="01B5F14FD57D7B89E05313B2F00A739F" 
  -external_id="oracle:defaultService:em:provisioning:1:cmp:COMP
  Component:SUB_OracleDB:0191172464DD36B6E05313B2F00AB90A:0.1" 
  -status=CURRENT

updateVersionStatus

Description

Updates the version status of the image.

Format

emcli db_software_maintenance -updateVersionStatus
  [-version_id= "<version_id>"]
  -status= "<status<"
  [-image_id="<image ID>" ] 
  [-targetType="<Type of target for Exadata patching>"]
  [-imageFile="<full path of image file for Exadata patching>";]
  [patchManagerLocation="<full path to unzipped Exadata file>"]

[ ]  indicates that the parameter is optional.

Options

  • version_id

    The version ID.

  • status

    The status of the version, for example DRAFT, ACTIVE, CURRENT, RESTRICTED.

  • image_id

    The image ID.

  • targetType

    Used exclusively for Exadata patching operations options are: oracle_si_netswitch, host, and oracle_exadata

  • imageFile

    Only for Exadata patching, the path where the image file for Exadata patching is located.

  • patchManagerLocation

    Only for Exadata patching operations, location of unzipped patch file.

Examples

The following example updates the version of the image with the version ID 02A635AOD8D904A4E05362F3E40ADFD8 to CURRENT.

emcli db_software_maintenance -updateVersionStatus 
  -version_id=02A635AOD8D904A4E05362F3E40ADFD8
  -status=CURRENT

Exadata Patching Examples

  • Storage Server:
    emcli db_software_maintenance 
    -updateVersionStatus
    -version_id="166E5A0FA92D6D46E063DF034B64E21E" 
    -status="CURRENT"
    -image_id="15314B07900969F6E063DF034B64F40C"  
    -targetType="oracle_exadata"
    -imageFile="/home/<user name>/FPP/p34568888_221300_Linux-x86-64";
  • Switch:
    emcli db_software_maintenance 
    -updateVersionStatus
    -version_id="166E5A0FA92D6D46E063DF034B64E21E" 
    -status="CURRENT"
    -image_id="15314B07900969F6E063DF034B64F40C"  
    -targetType="oracle_si_netswitch"
    -imageFile="/home/<user name>/FPP/p34568888_221300_Linux-x86-64";
  • Database node (host):
    emcli db_software_maintenance 
    -updateVersionStatus
    -version_id="166E5A0FA92D6D46E063DF034B64E21E" 
    -status="CURRENT"
    -image_id="15314B07900969F6E063DF034B64F40C"  
    -targetType="host"
    -imageFile="/home/<user name>/FPP/p34568888_221300_Linux-x86-64";
    patchManagerLocation="dbserver_patch_220810";

Note:

To obtain the imageFile or patchManagerLocation query the image. Once queried go to the location of the FPP server and see the file names.

getVersions

Description

Returns a list of the versions for the specified image.

Format

emcli db_software_maintenance -getVersions
  -image_id= "<image_id>"
  [-version_status= "<version_status>"]

[ ]  indicates that the parameter is optional.
  • image_id

    The name of the image.

  • version_status

    The status filter for the version.

Examples

The following example returns a list of versions for the image with the ID 01B5F14FD57D7B89E05313B2F00A739F.

emcli db_software_maintenance -getVersions
      -image_id="01B5F14FD57D7B89E05313B2F00A739F" 
      -version_status=CURRENT

getImageSubscriptions

Description

Returns the list of subscribed targets.

Format

emcli db_software_maintenance -getImageSubscriptions
  -image_id= "<image_id>" 
  • image_id

    The ID of the image.

Examples

The following example returns a list of targets for the image with the ID ID01B5F14FD57D7B89E05313B2F00A739F.

emcli db_software_maintenance -getImageSubscriptions
  -image_id="01B5F14FD57D7B89E05313B2F00A739F"

getSubscriptionsForContainer

Description

Returns the subscriptions for the container target, for example database pool.

Format

emcli db_software_maintenance -getSubscriptionsForContainer      
  -image_id= "<image_id>"   
  -target_name= "<target_name>"  
  -target_type= "<target_type>" 
  • image_id

    The image id.

  • target_name

    The name of the target in Oracle Enterprise Manager.

  • target_type

    The target type.

Examples

The following example returns the subscriptions for the Oracle Cloud Zone target with the name POOL NAME and the image ID FE55AD7AB28974EFE04313B2F00AD4A0.

emcli db_software_maintenance -getSubscriptionsForContainer
  -target_name="POOL NAME" 
  -target_type=oracle_cloud_zone 
  -image_id=FE55AD7AB28974EFE04313B2F00AD4A0

setup

Used to setup FPP server images for use in Fleet Maintenance.

getFPPServer

Obtains a list of FPP Servers available

Format

emcli db_software_maintenance 
-setup 
-getFPPServer 

Options

  • setup

    Denotes this is a setup operation for Exadata

registerFPPClient

Registers an FPP Client.

Format

emcli db_software_maintenance 
-setup 
-registerFPPclient 
-input_file="data:/<fileLocation>"
Options
  • setup

    Denotes this is a setup operation for Exadata

  • input_file
    This file contains the following entries:
    • serverName: The name of the FPP server that the client will register to.
    • clientName: The name of the FPP client that will be registered on the server

registerFPPServer

Registers an FPP Server.

Format

emcli db_software_maintenance 
-setup 
-registerFPPServer 
-input_file="data:/<fileLocation>"

Options

  • setup

    Denotes this is a setup operation for Exadata

  • input_file
    This file contains the following entries:
    • name: FPP Server name
    • restUrl: REST API URL
    • agentCredential: Credential for the agent, must be entered in the format <Named Credential: Credential Owner> where:
      • <Named Credential>: Named credential for the host where new Oracle home will be deployed.
      • <Credential Owner>: The Enterprise Manager user who owns this Named Credential. These credentials are used to run scripts as root.
    • username: REST API user name
    • password: REST API user password
    • timeToStart: Optional, start time for the procedure expressed as "YYYY-MM-DDTHH:MM:SS:msZ"
    • timeToEnd: Optional, end time for procedure expressed as "YYYY-MM-DDTHH:MM:SS:msZ"
    • isTargetZone: Optional, True/False
    • scheduleType: Optional parameter
    • recurring: Optional, schedule registration. Options are: Yearly/Monlthy/Weekly/Daily
    • startGracePeriodInMinutes: Optional, delay start of procedure in minutes

optInFPPSeries

Opts in an FPP Image series

Format

emcli db_software_maintenance  -setup -optInFPPSeries -input_file="data:<fileLocation>"

Options

  • setup

    Denotes this is a setup operation for Exadata

  • input_file
    This file contains the following entries:
    • seriesId: Image series ID, obtained via db_software_maintenance -getImages
    • targetType: Exadata target type, available options are host, oracle_exadata, and oracle_si_netswitch
    • imageFile: Zip file name that contains the patch image.
    • patchManagerLocation: Folder name of extracted Patch manager. Only for Host (DB node) target type.
    • currentVersionImageId: ID of the image version to be marked as current

Examples

The following examples opt in the different Exadata target types:
EM CLI:
emcli db_software_maintenance -setup -optInFPPSeries -input_file="data:/scratch/user/fpp/payload.properties"
Where the input file contains the following based on target type:
  • Host (database node)
    {    
    "seriesId": "14124C8C34FF5073E063E1144B64EA62",   
    "targetType":"host",    
    "imageFile":"p35769189_231600_Linux-x86-64.zip", 
    "patchManagerLocation":"dbserver_patch_220810",   
    "currentVersionImageId":"14124C8C35025073E063E1144B64EA62"  
    }
  • Switch
    {   
    "seriesId":"14124C8C34FF5073E063E1144B64EA62",    
    "targetType":"oracle_si_netswitch",    
    "imageFile":"p35769189_231600_Linux-x86-64.zip",    
    "currentVersionImageId":"14124C8C34FF5073E063E1144B64EA62"  
    }
  • Database node (host)
    {   
    "seriesId":"14124C8C34FF5073E063E1144B64EA62",    
    "targetType":"oracle_exadata",    
    "imageFile":"p35769189_231600_Linux-x86-64.zip",    
    "currentVersionImageId":"14124C8C34FF5073E063E1144B64EA62"  
    }

Fleet Management Software

performOperation -Deploy

Description

The deploy command automatically uses the current version of the subscribed image while creating the new Oracle Home.

Format

emcli db_software_maintenance -performOperation
  -name=""
  -purpose=""
  [-description=""]
  [-reportOnly="<true|false>"]
  -workDir=""
  [-start_schedule=""]
  [-inputfile="data:<file_location>"]
  [-target_type=""]
  [-target_list=""]
  [-normal_credential="<cred_name:cred_owner>"]
  [-privilege_credential="<cred_name:cred_owner>"]
  [-sql_sec="<sql_sec>"]
  [-rolling="true|false"]
  [-node_list=""]  [-standbyAutoDeploy="<true|false>"]
  [-blackoutguid="<true|false>"]
  [-migrate_non_cdb_pdb="<true|false>"]
  [-templateName="<template_path_and_name>"]
  [-dataFileLocation="<dataFileLocation>"]
[ ]  indicates that the parameter is optional.
  • name

    This is the unique name of the operation.

  • purpose
    There are standard purposes that can be performed by fleet operations which can be:
    • DEPLOY_DB_SOFTWARE
    • DEPLOY_RAC_SOFTWARE
    • DEPLOY_SIHA_SOFTWARE
    • DEPLOY_GI_SOFTWARE
    • DEPLOY_CBD_SOFTWARE
    • DEPLOY_GIMR_SOFTWARE

      Note:

      Only for Oracle Database 21C onward.
    • DEPLOY_EXADATA_SOFTWARE
  • description

    Description of the operation.

  • reportOnly

    This is used in case of CLEANUP_SOFTWARE where the user wishes to clean Oracle Homes that are candidates for deletion, but does not want to perform the actual cleanup operation.

  • workDir

    Work directory location.

  • target_type

    The type of target being provided in this operation

    For Oracle Database operations:
    • rac_database
    • oracle_database
    For Exadata operations:
    • oracle_exadata: For Exadata storage servers
    • oracle_si_netswitch: For Exadata network switch
    • host: For Exadata database nodes
  • normal_credential

    This must be entered in the format <Named Credential: Credential Owner> where:

    • <Named Credential>: Named credential for the host where new Oracle home will be deployed.
    • <Credential Owner>: The Enterprise Manager user who owns this Named Credential.
    For EXACC RAC use the OPC user for Normal Host credentials.
  • privilege_credential

    This must be entered in the format <Named Credential: Credential Owner> where:

    • <Named Credential>: Named credential for the host where new Oracle home will be deployed.
    • <Credential Owner>: The Enterprise Manager user who owns this Named Credential.

      These credentials are used to run scripts as root.

  • start_schedule

    The date on which the stage and deploy is to be started if it is to be started in the future.

    Format: start_time="YYYY/MM/DD HH:MM"

    Note:

    This is an optional parameter. If no date is provided, the fleet operation will start immediately.
  • input_file

    This file contains the following entries:

    • NEW_ORACLE_HOME_LIST= <path of new Oracle home>

      This is the location where the new Oracle Home will be installed on all the hosts. The Credential Owner must have read / write access to this location.

    • homeNamePrefix=<User defined Oracle Home name>: Allows you to define a custom Oracle Home name prefix, allowing for the ability to discover Oracle Homes with custom name in deployment command. If the home name prefix is not specified, the default value will be used. This variable is available starting with Oracle Enterprise Manager 13.5 Release update 20 (13.5.0.20).
    • workingDir=<Name of temp directory>
    • dispatchLoc=<Dispatch location>

      This is the location where all scripts will be staged on the host. These scripts will be executed as a “root” user.

    • isRootPreStaged=<True/False>
    • SKIP_PREREQUISITE_CHECKS=<true|false>- The default value is false.
    • SKIP_CVU_CHECK=<true|false>- The default value is false.
    • PREREQS_ONLY=<true|false>- The default value is false. This can be used to detect any errors during pre-requisites checks. The actual deployment will not happen when the value is set to “true”.
    • STANDYBY_START_OPTION=<OPEN | MOUNT | NOMOUNT | READ ONLY | READ ONLY WITH APPLY> - If this option is provided while patching the standby database, it will be started in the specified mode after patching. If the value is READ ONLY WITH APPLY, the MRP process will be started automatically. If this option is not provided:
      • Rolling applicable patch: The existing open_mode for the standby database will be archived before patching and it will be stored for the standby database after patching. If the open_mode for the standby database can not be retrieved, the standby database will be started in the default mode and a warning message will be shown. The process will not be stopped for any failure.
      • Non-rolling applicable patch: The standby database will be started in default mode and MRP process will not be started up.
    • PATCH_EXTRACT_LOCATION: (Exadata only) Location where the patch will be extracted on the Exadata client.

      Note:

      When deploying for multiple Exadata targets you must use the same folder structure and path for all.
  • sql_sec

    Sequence of CPU/PSU/EXA

  • rolling

    Flag to indicate if the patches can be applied in rolling mode.

  • node_list

    Comma separated list of hosts where the patching needs to be (e.g. rac_node1,rac_node2).

  • standbyAutoDeploy

    If the target is a primary database, a new Oracle home using the same gold image version as the Primary is deployed automatically on the Standby host. This parameter disables the automatic deployment of software on the standby host when set to False. Standby staging and deploy can be performed independently using EM CLI.

    This is an optional parameter, its default value is True.

  • blackoutguid

    Blackout guid to be passed to perform operation of UPDATE_RACDB purpose parameter node_list is passed. When passed, the update procedure will not create a new blackout on the database instance and with blackoutguid.

  • OSDBA_GROUP_GIMR= <group name>

    Only applicable for GIMR upgrades from a lesser than to a 21C or greater version.

  • OSDBA_GROUP_GIMR=dba

    Only applicable for GIMR upgrades from a lesser than to a 21C or greater version.

  • OSOPER_GROUP_GIMR = <group name>

    Only applicable for GIMR upgrades from a lesser than to a 21C or greater version.

  • OSBACKUPDBA_GROUP_GIMR = <group name>

    Only applicable for GIMR upgrades from a lesser than to a 21C or greater version.

  • OSDGDBA_GROUP_GIMR = <group name>

    Only applicable for GIMR upgrades from a lesser than to a 21C or greater version.

  • OSKMDBA_GROUP_GIMR = <group name>

    Only applicable for GIMR upgrades from a lesser than to a 21C or greater version.

  • OSRACDBA_GROUP_GIMR = <group name>

    Only applicable for GIMR upgrades from a lesser than to a 21C or greater version.

  • OSINSTALL_GROUP_GIMR = <group name>

    Only applicable for GIMR upgrades from a lesser than to a 21C or greater version.

  • IS_REDEPLOY=true

    Applicable for redeploying corrupt Oracle Homes.

  • templateName=<template_path_and_name>

    Allows the use of a previously created template in the Software Library for deploy.

  • dataFileLocation=<dataFileLocation>

    Allows for specifying a custom data file location for the deploy to perform.

Note:

This verb submits a procedure which must be completed before you can proceed with the next steps.

Examples

The following example goes over the deployment of Oracle Home.

Attach Oracle Home:

To merge Oracle Homes of two databases, provide the flag attach_home=true and type the same location in the input_file where the same version of the image is already deployed.

For more information, see Attach Oracle Homes in Enterprise Manager Lifecycle Management Administrator's Guide.

emcli db_software_maintenance -performOperation -name="Deploy Home"
 -purpose="DEPLOY_DB_SOFTWARE"
 -target_type=oracle_database
 -target_list=db1221
 -normal_credential="NORMAL:SYSMAN"
 -privilege_credential="ROOT:SYSMAN"
 -input_file="data:/deploy_OH.prop"
 -attach_home=true

Deploy GI Software

emcli db_software_maintenance -performOperation -name="Deploy
 -1120407 GI Home"
 -purpose=DEPLOY_GI_SOFTWARE
 -target_type=input_file
 -target_list="CLUSTER1"
 -normal_credential="NC_HOST_CREDS:TESTSUPERADMIN"
 -privilege_credential="HOST_PRIV:TESTSUPERADMIN"
 -inputfile="data:/usr/oracle/deploy.txt"

Deploy Container Databases

emcli db_software_maintenance -performOperation
-purpose="DEPLOY_CDB"
-target_name="<>CDB Name that is being patched"
-target_type="<target type>
-name="Operation Name”
-description="Operation description"
-db_prefix | db_name ="<DB Name prefix or DB name>"
–normal_credential="<credential name>"
–privilege_credential="<credential name>"
–database_credential="SYSDBA credential name>"

If you are using existing container:

emcli db_software_maintenance -performOperation 
-purpose="ATTACH_CDB"
-target_name="<CDB Name that is being patched>"
-target_type="<target type>"
-name="Operation Name”
-description="Operation description"
-destinationCDB ="<Container database to which PDBs will be migrated>"
–normal_credential="<credential name>"
–privilege_credential=”<credential name>"
–database_credential="<SYSDBA credential name>"
Deploy GIMR for Oracle Database 21C
emcli db_software_maintenance 
-performOperation -name="Deploy GIMR Home"
-purpose=DEPLOY_GIMR_SOFTWARE 
-target_type=cluster   
-target_list=GI-SAMPLE-cluster 
-normal_credential="NC_HOST_CREDS:SYSMAN"
-privilege_credential="HOST_PRIV:SYSMAN"
-input_file="data:/scratch/<userid>/fleetData/deployGIMRHOME"

Deploy Exadata

Storage Server
emcli db_software_maintenance -performOperation 
-name="Deploy ExadataStorage Cell node" 
-purpose=DEPLOY_EXADATA_SOFTWARE  
-target_type=oracle_exadata
-target_list="cell1,cell2" 
-input_file="data:/scratch/user/fpp/deployExadata.prop" 
-start_schedule="2024/04/2006:10"
Switch
emcli db_software_maintenance -performOperation 
-name="Deploy Exadata IB Switch node" 
-purpose=DEPLOY_EXADATA_SOFTWARE  
-target_type=oracle_si_netswitch
-target_list="Switch1,Switch2"  
-input_file="data:/scratch/user/fpp/deployExadata.prop" 
Database Node (host)
emcli db_software_maintenance -performOperation 
-name="Deploy Exadata DB node" 
-purpose=DEPLOY_EXADATA_SOFTWARE 
-target_type=host  -target_list="DB1" 
-input_file="data:/scratch/user/fpp/deployExadata.prop" 
Where the input file for all three examples will contain:
WORKING_DIRECTORY=/tmp
PATCH_EXTRACT_LOCATION=/tmp

performOperation -Update

Description

The Update command is used for migrating listeners and updating Oracle Homes with the least amount of downtime:

Format

emcli db_software_maintenance -performOperation
  -name=""
  -purpose=""
  -database_credential="SYS_WELCOME:SYSMAN" *
  [-description=""]
  -workDir="/<location>"
  [-start_schedule=""]
  [-inputfile="data:<file_location>"]
  [-target_type=""]
  [-target_list=""]
  [-normal_credential="<cred_name:cred_owner>"]
  [-privilege_credential="<cred_name:cred_owner>"]
  [-sql_sec="<sql_sec>"]
  [-rolling="true|false"]
  [-node_list=""]
  [-startupDBAAfterSwitch="<true|false>"]
  [-skipSwitchDatabase="<true|false>"]
  [-startupDatabase="<true|false>"]
  [-ignoreStandbyPrereq="<true|false>"]
  [-blackoutguid="<true|false>"]
  [-migrate_non_cdb_pdb="<true|false>"]
  [-drain_timeout=<seconds>]*
  
[ ]  indicates that the parameter is optional.
* Only for non-cdb to PDB upgrades (including Exadata). 
  • name

    This is the unique name of the operation.

  • purpose
    There are standard purposes that can be performed by fleet operations which can be:
    • MIGRATE_LISTENER
    • UPDATE_DB for single instance and SIHA
    • UPDATE_RACDB for RAC database and RAC one-node
    • UPDATE_GI for cluster
    • UPDATE_SIHA
    • UPDATE_GIMR for Oracle Database 21C onward, updates the GIMR independent from the GI update
    • UPGRADE_DB only for non-CDB to PDB migration
    • UPGRADE_RACDB only for non-CDB to PDB migration
    • UPDATE_EXADATA_SOFTWARE only for Exadata operations on all Exadata target types (database, switch and host)
  • target_type

    The type of target being provided in this operation

    For Oracle Database operations:
    • rac_database
    • oracle_database
    For Exadata operations:
    • oracle_exadata: For storage cells
    • oracle_si_netswitch: For Exadata network switch
    • host: For Exadata database nodes
  • target_list

    This is a comma separated list of targets which are to be migrated.

  • normal_credential

    This must be entered in the format <Named Credential: Credential Owner> where:

    • <Named Credential>: Named credential for the host where new Oracle home will be deployed.
    • <Credential Owner>: The Enterprise Manager user who owns this Named Credential.
    For EXACC RAC use the OPC user for Normal Host credentials.
  • privilege_credential

    This must be entered in the format <Named Credential: Credential Owner> where:

    • <Named Credential>: Named credential for the host where new Oracle home will be deployed.
    • <Credential Owner>: The Enterprise Manager user who owns this Named Credential.

      These credentials are used to run scripts as root.

  • rolling

    This is an optional flag with the default value as true. The update procedure works in "Rolling Patch" mode by default but you can override this if necessary.

  • start_schedule

    The date on which the stage and deploy is to be started if it is to be started in the future.

    Format: start_time="YYYY/MM/DD HH:MM"

    Note:

    This is an optional parameter. If no date is provided, the fleet operation will start immediately.
  • Input_file

    This file contains the following entries:

    • NEW_ORACLE_HOME_LIST= <path of new Oracle home>

      This is the location where the new Oracle Home will be installed on all the hosts. The Credential Owner must have read / write access to this location.

    • workingDir=<Name of temp directory>

      Required for Exadata operations

    • dispatchLoc=<Dispatch location>

      This is the location where all scripts will be staged on the host. These scripts will be executed as a “root” user.

    • SKIP_PREREQUISITE_CHECKS=<true|false>- The default value is false.
    • SKIP_CVU_CHECK=<true|false>- The default value is false.
    • PREREQS_ONLY=<true|false>- The default value is false. This can be used to detect any errors during pre-requisites checks. The actual deployment will not happen when the value is set to “true”.
    • STANDYBY_START_OPTION=<OPEN | MOUNT | NOMOUNT | READ ONLY | READ ONLY WITH APPLY> - If this option is provided while patching the standby database, it will be started in the specified mode after patching. If the value is READ ONLY WITH APPLY, the MRP process will be started automatically. If this option is not provided:
      • Rolling applicable patch: The existing open_mode for the standby database will be archived before patching and it will be stored for the standby database after patching. If the open_mode for the standby database can not be retrieved, the standby database will be started in the default mode and a warning message will be shown. The process will not be stopped for any failure.
      • Non-rolling applicable patch: The standby database will be started in default mode and MRP process will not be started up.
    • OSDBA_GROUP_GIMR= <group name>

      Only applicable for GIMR upgrades from a lesser than to a 21C or greater version.

    • OSDBA_GROUP_GIMR=dba

      Only applicable for GIMR upgrades from a lesser than to a 21C or greater version.

    • OSOPER_GROUP_GIMR = <group name>

      Only applicable for GIMR upgrades from a lesser than to a 21C or greater version.

    • OSBACKUPDBA_GROUP_GIMR = <group name>

      Only applicable for GIMR upgrades from a lesser than to a 21C or greater version.

    • OSDGDBA_GROUP_GIMR = <group name>

      Only applicable for GIMR upgrades from a lesser than to a 21C or greater version.

    • OSKMDBA_GROUP_GIMR = <group name>

      Only applicable for GIMR upgrades from a lesser than to a 21C or greater version.

    • OSRACDBA_GROUP_GIMR = <group name>

      Only applicable for GIMR upgrades from a lesser than to a 21C or greater version.

    • OSINSTALL_GROUP_GIMR = <group name>

      Only applicable for GIMR upgrades from a lesser than to a 21C or greater version.

    Note:

    This verb submits a procedure which must be completed before you can proceed with the next steps.
  • migrate_non_cdb_pdb

    Only applicable for UPGRADE_DB and UPGRADE_RACDB purposes. This optional flag is only used when you want to migrate a database to a pluggable database where the source version is lower than 20c.

  • drain_timeout

    Only applicable for Grid Infrastructure updates. Specify the drain time in seconds allowing for resource draining to complete and services to stop. When specified accepted drain time values are 0, or any positive integer; if set to 0 draining occurs immediately. If DRAIN_TIMEOUT is not specified the default drain timeout specified at database service creation will be used.

For UPGRADE_DB and UPGRADE_RACDB purposes the following mandatory parameters need to be added into the input file:
SRC_WORK_DIR= <source host work directory location>
DEST_PDB_NAME=<Name of the PDB clone>
DEST_CDB_CRED="CRED_NAME:OWNER"
DEST_HOST_CRED="CRED_NAME:OWNER"
For UPGRADE_DB and UPGRADE_RACDB purposes the following optional parameters can be added into the input file:
SRC_WALLET_PWD=<SourceTDE wallet password>
DEST_WALLET_PWD=<Destination TDE wallet password>
DB_LINK_NAME=<DBLINK name>
DATAFILES_LOCATION=<Datafile location path>
STORAGE_MAX_SIZE=<Size of PDB tablespace in mb>
DEST_PDB_DISPLAY_NAME=<PDB Display name>
STORAGE_MAX_SHARED_TEMP_SIZE= <Amount of storage in the default temporary PDB tablespace in mb>
LOGGING_TYPE=<LOGGING | NO_LOGGING>
EXCLUDE_STANDBYS=<Y | N>
MASKING_DEFINITION_NAME=<PDB Masking definition>
PRE_SCRIPT_URN=<URN location>
POST_SCRIPT_URN=<URN location>
POST_SQL_SCRIPT_URN=<URN location>
POST_SQL_RUN_AS_USER=<User name>
POST_SQL_RUN_AS_USER_PWD=<User Password>
DEST_WORK_DIR=<Temporary work directory>
PDB_ADMIN_NAME=<PDB Admin>
PDB_ADMIN_PWD=<PDB Admin Password>
DELETE_SRC_DB=<true|false> [TRUE default]

Examples

Migrating the Listeners

If there are listeners running from the database home, use the following verb to migrate them to the parallel Oracle Home, you can use this command to migrate the listeners running from Oracle database homes. Grid Infrastructure homes are automatically migrated during the GI update process.

emcli db_software_maintenance -performOperation
-name="Update Listener"
-purpose=migrate_listener
-target_type=oracle_database
-target_list="DB1"
-normal_credential="NC_HOST_CREDS:SYSMAN"
-privilege_credential="HOST PRIV:SYSMAN"
start_schedule

Updating the Database / Cluster

After the stage and deploy operations are completed, the grid infrastructure instances should be migrated to the newly deployed Grid Infrastructure Homes.

emcli db_software_maintenance -performOperation
-name="Update Cluster"
-purpose=UPDATE_GI
-target_type=cluster
-target_list=CLUSTER1
-normal_credential="NC_HOST_CREDS:SYSMAN"
-privilege_credential="HOST PRIV:SYSMAN"
[-rolling=<true/false]

To update an Oracle Database, database credentials can be provided using the flag -database_credential="DB_SYS_CREDS:SYSMAN". If the credentials are not provided with this flag, the preferred set credentials will be used instead.

The TDE wallet password must be provided in the input file -input_file="data:<INPUT.PROPERTIES>". If the TDE configuration fails or database credentials are not provided, the database update will continue without TDE configuration.

For UPDATE_PDB:
  • TDE must already be configured in the destination CDB.
  • Source and destination passwords must be included in the input file.

    Example:

    srcWalletPassword=<SOURCE_PASSWORD>

    destWalletPassword=<DESTINATION_PASSWORD>

Node Wise RAC Database / Cluster Update

A cluster update always requires that all the RAC database instances running on that node be shut down during the switch process of the cluster instance. Hence, a cluster update followed by a RAC database updates results in an instance getting restarted twice.

There may be several situations where the administrator may require more control over the switch process. For example, the administrator may choose to perform a node-wise update of the cluster and RAC databases in order to avoid multiple restarts of the database instances. The administrator may also need to perform node specific pre-post steps.

emcli db_software_maintenance -performOperation -name="Update Cluster"
-purpose=UPDATE_GI
-target_type=cluster
-target_list=CLUSTER1
-normal_credential="NC_HOST_CREDS:SYSMAN"
-privilege_credential="HOST_PRIV:SYSMAN"
-rolling=true 
-node_list="host1.example.com"
–startupDatabase=false
-drain_timeout=10
This option provides this control by enabling the user to perform the following tasks for each node:
  • Switch the cluster instance.
  • Leave the RAC database instances shutdown.

    For example, consider RAC databases RACDB_112 and RACDB_121 are running on this cluster. The instances RACDB_112_1 and RACDB_121_1 running on this specific node will continue to remain shut down after the cluster instance is switched.

  • Switch all the RAC database instances on the same node.
  • This step will switch the instances RACDB_112_1 and RACDB_121_1 to the new home and will restart the same.

    For example, consider RAC databases RACDB_112 and RACDB_121 are running on this cluster. The instances RACDB_112_1 and RACDB_121_1 running on this specific node will continue to remain shut down after the cluster instance is switched.

emcli db_software_maintenance -performOperation
-name="Update RAC DB"
-purpose=UPDATE_RACDB
-target_type=rac_database
-target_list=RACDB
-normal_credential="NC_HOST_CREDS:SYSMAN"
-privilege_credential="HOST_PRIV:SYSMAN"
-rolling=true
-node_list="host1.example.com"

Update GIMR for Oracle Database 21C

This example should only be used for GIMR updates on Oracle 21C or above databases. Starting in 21C the GIMR component is separate from the Grid Infrastructure and needs to be updated separately.
emcli db_software_maintenance 
-performOperation -name="Update GIMR Home"
-purpose=UPDATE_GIMR 
-target_type=cluster   
-target_list=GI-SAMPLE-cluster 
-normal_credential="NC_HOST_CREDS:SYSMAN"
-privilege_credential="HOST_PRIV:SYSMAN"
-input_file="data:/scratch/<userid>/fleetData/deployGIMRHOME"
For this use case the following input file parameters outlined above need to be added: OSDBA_GROUP_GIMR, OSDBA_GROUP_GIMR, OSOPER_GROUP_GIMR, OSBACKUPDBA_GROUP_GIMR, OSDGDBA_GROUP_GIMR, OSKMDBA_GROUP_GIMR, OSRACDBA_GROUP_GIMR, OSINSTALL_GROUP_GIMR.

Upgrade a non-CDB to PDB

This example moves a non-CDB database to a new PDB clone:
emcli db_software_maintenance -performOperation 
-name="TEST1" 
-purpose=UPGRADE_DB 
-target_type=oracle_database 
-target_list="source3" 
-normal_credential="SOURCE_ORACLE:SYSMAN" 
-privilege_credential="SOURCE_ROOT:SYSMAN" 
-database_credential="SOURCE_SYS:SYSMAN"
-input_file="data:/scratch/test1.txt"
Input file content:
SRC_WORK_DIR=/tmp
DEST_PDB_NAME=pdbmigrate2
DEST_PDB_DISPLAY_NAME =pdbmigrate2
        DEST_CDB_CRED = SYS_WELCOME:SYSMAN
        DEST_HOST_CRED = CUSER:SYSMAN
        DEST_WORK_DIR = /tmp
PDB_ADMIN_NAME = PDBADMIN
PDB_ADMIN_PWD = welcome

Update Exadata Resources

Storage Cell
emcli db_software_maintenance -performOperation 
-name="Update Storage Cell node" 
-purpose="UPDATE_EXADATA_SOFTWARE" 
-target_list="Cell1,Cell2" 
-target_type="oracle_exadata" 
-input_file="data://home/user/fppinstallfest/updateExadata.prop"
Switch
emcli db_software_maintenance 
-performOperation 
-name="Update IB Switch node" 
-purpose="UPDATE_EXADATA_SOFTWARE" 
-target_list="IB1,IB2" 
-target_type="oracle_si_netswitch" 
-input_file="data://home/user/fppinstallfest/updateExadata.prop"
Database node (host)
emcli db_software_maintenance 
-performOperation 
-name="Update DB node" 
-purpose="UPDATE_EXADATA_SOFTWARE" 
-target_list="scaqal02adm03.example.com" 
-target_type="host" 
-input_file="data://home/user/fppinstallfest/updateExadata.prop"
For all three Exadata examples the input file will be:
WORKING_DIRECTORY=/tmp
[fppOptions={"eval":"true"}]
fppOptions is an optional parameter that allows for an evaluation of the update operation to verify if the update will succeed. To perform the update operation remove this optional parameter.

performOperation -Rollback

Description

This command is used to switch the database back to the previous Oracle home after the Update operation has been completed.

Format

emcli db_software_maintenance -performOperation
  -name=""
  -purpose=""
  [-description=""]
  -workDir=""
  [-start_schedule=""]
  [-inputfile="data:<file_location>"]
  [-target_type=""]
  [-target_list=""]
  [-normal_credential="<cred_name:cred_owner>"]
  [-privilege_credential="<cred_name:cred_owner>"]
  [-sql_sec="<sql_sec>"]
  [-rolling="true|false"]
  [-node_list=""]
  [-startupDBAAfterSwitch="<true|false>"]
  [-skipSwitchDatabase="<true|false>"]
  [-startupDatabase="<true|false>"]
  [-ignoreStandbyPrereq="<true|false>"]
  [-standbyAutoDeploy="<true|false>"]
  [-blackoutguid="<true|false>"]
  [start_schedule="<YYYY/MM/DD HH/MM>"]

[ ]  indicates that the parameter is optional.
  • name

    This is the unique name of the operation.

  • purpose

    The standard purposes that can be performed by Fleet Operations are:

    • ROLLBACK_DB

    • ROLLBACK_RACDB

    • ROLLBACK_GI

    • ROLLBACK_SIHA

    • ROLLBACK_LISTENER

    • ROLLBACK_EXADATA_SOFTWARE

  • target_type

    The type of target being provided in this operation

    For Oracle Database operations:
    • rac_database
    • oracle_database
    For Exadata operations:
    • oracle_exadata: For Exadata storage cells
    • oracle_si_netswitch: For Exadata network switch
    • host: For Exadata database nodes
  • target_list

    This is a comma separated list of targets which need to be patched.

    • Targets of homogenous types are supported in a single fleet operation.

    • A unique list of hosts based on this target list is displayed and start stage of Oracle home software on those hosts.

    • If targets running from the same Oracle home are provided in this list, the stage and deploy operation will be started only once and not for all targets.

  • normal_credential

    This must be entered in the format <Named Credential: Credential Owner> where:
    • <Named Credential>: Named credential for the host where new Oracle home will be deployed.

    • <Credential Owner>: The Enterprise Manager user who owns this Named Credential.

    For EXACC RAC use the OPC user for Normal Host credentials.
  • privilege_credential
    This must be entered in the format <Named Credential: Credential Owner> where:
    • <Named Credential>: Named credential for the host where new Oracle home will be deployed.

    • <Credential Owner>: The Enterprise Manager user who owns this Named Credential.

      These credentials are used to run scripts as root.

  • non_rolling

    By default, rollback is performed on all nodes. If the non_rolling back flag is enabled, you can select the list of nodes (using the node_list command) that are to be rolled back.

  • rolling

    By default rollback is performed in rolling fashion. This flag is used when the current Oracle home has patches that were applied in non-rolling mode (OJVM) and need to be rolled back.

  • node_list

    This is a comma separated list of hosts on which the instances need to be updated.

    For example: If RACDB is running on a 4 node cluster host1, host2, host3, and host4 and you choose to update the instances in only 2 hosts at a time, the value of this parameter needs to be specified as node_list="host1, host2".

  • start_schedule

    Optional time to start the operation, entered as: "YYYY/MM/DD HH:MM".
  • Input_file

    This file contains the following entries:

    • NEW_ORACLE_HOME_LIST= <path of new Oracle home>

      This is the location where the new Oracle Home will be installed on all the hosts. The Credential Owner must have read / write access to this location.

    • workingDir=<Name of temp directory>

      Note:

      This is the only entry required for Exadata Fleet Operations.
    • dispatchLoc=<Dispatch location>

      This is the location where all scripts will be staged on the host. These scripts will be executed as a “root” user.

    • SKIP_PREREQUISITE_CHECKS=<true|false>- The default value is false.

    • SKIP_CVU_CHECK=<true|false>- The default value is false.

    • PREREQS_ONLY=<true|false>- The default value is false. This can be used to detect any errors during pre-requisites checks. The actual deployment will not happen when the value is set to “true”.

    • STANDYBY_START_OPTION=<OPEN | MOUNT | NOMOUNT | READ ONLY | READ ONLY WITH APPLY> - If this option is provided while patching the standby database, it will be started in the specified mode after patching. If the value is READ ONLY WITH APPLY, the MRP process will be started automatically. If this option is not provided:
      • Rolling applicable patch: The existing open_mode for the standby database will be archived before patching and it will be stored for the standby database after patching. If the open_mode for the standby database can not be retrieved, the standby database will be started in the default mode and a warning message will be shown. The process will not be stopped for any failure.
      • Non-rolling applicable patch: The standby database will be started in default mode and MRP process will not be started up.

    Note:

    This verb submits a procedure which must be completed before you can proceed with the next steps.

Examples

Rollback RAC DB

emcli db_software_maintenance -performOperation
 -name="Rollback RAC DB"
 -purpose=ROLLBACK_RACDB
 -target_type=rac_database
 -target_list=RACDB
 -normal_credential="NC_HOST_CREDS:SYSMAN"
 -privilege_credential="HOST_PRIV:SYSMAN"
 [-rolling=true/false]
 [-node_list="host1.example.com"]

Rollback Listener

emcli db_software_maintenance -performOperation
 -name="Rollback Listener"
 -purpose=ROLLBACK_LISTENER
 -target_type=oracle_database
 -target_list=SAMPLEDB
 -normal_credential="NC_HOST_CREDS:SYSMAN"
 -privilege_credential="HOST_PRIV:SYSMAN"

Rollback GI

emcli db_software_maintenance -performOperation 
-name="RollbackGI" 
-description="Rollback GI"
-purpose=ROLLBACK_GI
-normal_credential="NC_HOST_CREDS:SYSMAN"
-privilege_credential="HOST_PRIV:SYSMAN" 
-force=true

Note:

If the previous grid update or patching failed, Enterprise Manager will ask you to provide the -force flag when using ROLLBACK_GI. The -force is not required for the rollback grid operation, if the previous grid update succeeded.

Rollback Exadata Storage Cell

emcli db_software_maintenance -performOperation 
-name="Rollback Storage Cell node" 
-purpose="ROLLBACK_EXADATA_SOFTWARE" 
-target_list="Cell1,Cell2" 
-target_type="oracle_exadata" 
-input_file="data://home/user/fppinstallfest/updateExadata.prop"

Rollback Exadata Switch

emcli db_software_maintenance -performOperation 
-name="Rollback IB switch node" 
-purpose="ROLLBACK_EXADATA_SOFTWARE" 
-target_list="IB1,IB2" 
-target_type="oracle_si_netswitch" 
-input_file="data://home/user/fppinstallfest/updateExadata.prop"

Rollback Exadata Database node (host)

emcli db_software_maintenance -performOperation 
-name="Rollback DB node" 
-purpose="ROLLBACK_EXADATA_SOFTWARE" 
-target_list="scaqal02adm03.example.com" 
-target_type="host" 
-input_file="data://home/user/fppinstallfest/updateExadata.prop"
For all three Exadata examples the input file will be:
WORKING_DIRECTORY=/tmp
[fppOptions={"eval":"true"}]
fppOptions is an optional parameter that allows for an evaluation of the rollback operation to verify if the update will succeed. To perform the update operation remove this optional parameter.

performOperation -Cleanup

Description

User can cleanup a Oracle Home by providing the target name in -target_list and -target_type=oracle_home.

Format

emcli db_software_maintenance -performOperation 
-name="cleanup"
-purpose="CLEANUP_SOFTWARE"
  [-description=""]
  [-reportOnly="<true|false>"]
  [-workDir=""]
  [-start_schedule=""]
  [-target_type=""]
  [-target_list=""]
  [-normal_credential="<cred_name:cred_owner>"]
  [-privilege_credential="<cred_name:cred_owner>"]
  [-force=true]
  

Note:

The user can perform a cleanup in two ways:
  • The user can pass the database in -target_list and pass -target_type=<oracle_database/rac_database> and the script will perform the cleanup to the attached Oracle Home.
  • The user can pass the Oracle Home as a target in -target_list and the script will validate and perform the cleanup.

If any target is associated with the given home, Cleanup will be not done for the given home. User has to provide homes on all the nodes for a RAC before Cleanup can be done.

  • description

    Description of the operation.

  • reportOnly

    This is used in case of CLEANUP_SOFTWARE where the user wishes to clean Oracle Homes that are candidates for deletion, but does not want to perform the actual cleanup operation.

    Note:

    Credentials are not required when using reportOnly.
  • workDir

    Work directory location.

  • target_type

    The type of target on which this operation is being performed.

  • target_list

    This is a comma separated list of targets that need to be patched.

  • normal_credential

    This must be entered in the format <Named Credential: Credential Owner> where:

    • <Named Credential>: Named credential for the host where new Oracle home will be deployed.

    • <Credential Owner>: The Enterprise Manager user who owns this Named Credential.

  • privilege_credential

    This must be entered in the format <Named Credential: Credential Owner> where:

    • <Named Credential>: Named credential for the host where new Oracle home will be deployed.

    • <Credential Owner>: The Enterprise Manager user who owns this Named Credential.

      These credentials are used to run scripts as root.

    For EXACC RAC use the OPC user for Normal Host credentials.
  • start_schedule

    The date on which the stage and deploy is to be started if it is to be started in the future.

    Format: "start_time:yyyy/mm/dd HH:mm"

    Note:

    This is an optional parameter. If no date is provided, the fleet operation will start immediately.
  • force
    Optional flag, its default value is false. Cleanup of Oracle home affects the databases running from that home, by default the cleanup is skipped if processes (databases, listeners, cluster) are found running from this home. You can provide the force=true flag to skip the verification and remove all processes running from this home. This removes all processes running from the home which were not discovered in Enterprise Manager as well.

    Note:

    This is a severely destructive operation, the procedure will start after a 5 minute delay, providing you with the opportunity to abort the procedure. .

Example

emcli db_software_maintenance -performOperation 
-name="cleanup"
-purpose="CLEANUP_SOFTWARE" 
-target_list=OraDB12Home_host.com:1111
-target_type=oracle_home 
-normal_credential=NORMAL:SYSMAN
-privilege_credential=ROOT:SYSMAN
-workDir=/tmp