Rollback Operations

The Rollback command is used to switch the database back to the previous Oracle Home after the Update operation has been completed.

Note:

  • Before performing a rollback operation, if your listener is in a custom location, be sure to first set the TNS_ADMIN environment variable to this location . Next, restart the agent and then proceed with these operations.
  • If during a database or RAC rollback you need to update any Static Entry and your listener.ora is located in the Grid Oracle Home default location (GI_HOME/network/admin) normal credentials will not work (for example DB Home Owner). This is because the owner of the file is the Grid Home owner. Make sure the file has permissions to at least group level to be modified by both Database and Grid Oracle Home Users.

Sample Code for ROLLBACK_DB

emcli db_software_maintenance 
-performOperation 
-name="Rollback DB" 
-purpose=ROLLBACK_DB 
-target_type=<target type> 
-target_list=<list of targets> 
-normal_credential="NC_HOST_CREDS:SYSMAN" 
-privilege_credential="HOST_PRIV:SYSMAN" 
-rolling=[true/false] 
-node_list="host1.example.com"
  • name: This is the unique name of the operation.
  • purpose: There are standard purposes that can be performed by Fleet Operations which can be:
    • ROLLBACK_DB
    • ROLLBACK_RACDB
    • ROLLBACK_GI
  • target_type: The type of target being provided in this operation which can "rac_database" or "oracle_databaseā€.
  • 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.
  • 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".

Note:

For Windows Single Instance database rollback operations use windows_sec_credential="Named Credential:Credential Owner" instead of privilege_credential. Starting with Enterprise Manager 13,5 Release Update 2 you can also use either –is_virtual_account="true" or –is_builtin_account="true" accounts.
Examples:
emcli db_software_maintenance -performOperation -name="Rollback SIDB" -purpose=ROLLBACK_DB 
-target_type=oracle_database -target_list="ORCLTDE.abc.example.com" -rolling=false
-normal_credential="LOCALADMIN:SYSMAN" -windows_sec_credential="LOCALUSERCRED:SYSMAN"
-database_credential="SYSDBA:SYSMAN"
emcli db_software_maintenance -performOperation -name="Rollback SIDB" -purpose=ROLLBACK_DB 
-target_type=oracle_database -target_list="ORCLTDE.abc.example.com" -rolling=false
-normal_credential="LOCALADMIN:SYSMAN" –is_virtual_account="true"
-database_credential="SYSDBA:SYSMAN"
emcli db_software_maintenance -performOperation -name="Rollback SIDB" -purpose=ROLLBACK_DB 
-target_type=oracle_database -target_list="ORCLTDE.abc.example.com" -rolling=false
-normal_credential="LOCALADMIN:SYSMAN" is_builtin_account="true"
-database_credential="SYSDBA:SYSMAN"

Sample Code for ROLLBACK_RACDB

emcli db_software_maintenance 
-performOperation 
-name="Rollback RAC DB" 
-purpose=ROLLBACK_RACDB 
-target_type=<target type> 
-target_list=<list of targets> 
-normal_credential="NC_HOST_CREDS:SYSMAN" 
-privilege_credential="HOST_PRIV:SYSMAN" 
-rolling=[true/false] 
-node_list="host1.example.com"
Sample Code For ROLLBACK_GI
emcli db_software_maintenance  
-performOperation  
-name="Rollback GRID"  
-purpose=ROLLBACK_GI  
-target_type=cluster 
-target_list="sample01-cluster"  
-normal_credential="NC_HOST_CREDS:SYSMAN"  
-privilege_credential="HOST_PRIV:SYSMAN"
-SKIP_CVU_CHECK=<true/false>
SKIP_CVU_CHECK: This flag allows skipping the CVU check if set to true. This is an optional flag only used for ROLLBACK_GI operations.
Sample Code for ROLLBACK_SIHA
emcli db_software_maintenance  
-performOperation  
-name="Rollback"  
-purpose="ROLLBACK_SIHA"  
-target_type=has  
-target_list="has_abc"  
-normal_credential="NC_HOST_CREDS:SYSMAN"  
-privilege_credential="HOST_PRIV:SYSMAN"
-SKIP_CVU_CHECK=<true/false>
SKIP_CVU_CHECK: This flag allows skipping the CVU check if set to true. This is an optional flag only used for ROLLBACK_GI operations.