Emergency Patching
You can now perform emergency patching with Fleet Maintenance. Emergency patching does not replace regular maintenance cycle patching, non-critical patches should be flagged for inclusion into the next version of the image.
Emergency patched databases will be labeled as Drifted databases and will need to be reconciled in the next maintenance cycle either by rolling the changes to a new version of the image or override it with the latest version.
Emergency patching with Fleet Maintenance will not require the creation of a new version of a Gold Image. Databases that require an emergency patch will be switched out to new homes similar to the process used for scheduled maintenance. By switching the problem databases to new homes they can be isolated and patched without impacting functioning databases in the original home.
Overview of Steps For Emergency Patching
- Prepare a complete list of emergency patches to be applied.
- Identify required emergency patches.
- Identify and merge conflicts between patches applied and the list of patches to be applied.
- Request merge patches to Oracle Support (if required).
- Once all desired patches are available, download all patches into the software library.
- Deploy software along with emergency patches into a new home.
- Switch the emergency patched database to the new home.
Deploy Software Along with Emergency Patches
Single Instance Databaseemcli db_software_maintenance
-performOperation
-name="Deploy - Critical one-off 12345"
-purpose=EMERGENCY_DEPLOY_DB_SOFTWARE
-target_type='oracle_database' -target_list="DB1"
-normal_credential="<normal credential>"
-privilege_credential="<host privilege credential>"
-inputfile="data:/<user>/oracle/deploy.txt"
-patch_list=<List of conflict-free patches in the software library>
Where:PURPOSE
must be set withEMERGENCY_DEPLOY_DB_SOFTWARE
.PATCH_LIST
must follow thepatchID:ReleaseID:PlatformID:LanguageID
format. ReleaseID, PlatformID, LanguageID are optional arguments.INPUTFILE
must contain:NEW_ORACLE_HOME_LIST=<Emergency home location>
DISPATCHER_LOC=<Dispatcher location>
PATCH_LIST=<List of conflict-free patches in the software library>
emcli db_software_maintenance -performOperation -name="Deploy - Critical one-off 12345"
-purpose=EMERGENCY_DEPLOY_RAC_SOFTWARE
-target_type='rac_database' -target_list="DB1"
-normal_credential="<normal credential>"
-privilege_credential="<host privilege credential>"
-inputfile="data:/<user>/oracle/deploy.txt"
-patch_list=<List of conflict-free patches in the software library>
Where:PURPOSE
must be set withEMERGENCY_DEPLOY_RAC_SOFTWARE
.patch_list
Can be either passed as command line argument or as the input file parameter. In case of input file parameter the parameter should be defined in upper case.
Switch Database to Emergency Home
To switch database you will need to run anUPDATE_DB
command, this will move the database to be patched to the new empty home.emcli db_software_maintenance -performOperation -name="Update DB"
-purpose=UPDATE_DB
-target_type=oracle_database
-target_list="DB1"
-normal_credential="<normal credential>"
-privilege_credential="<host privilege credential>"
-destinationOracleHomeLocation=<path of the new Oracle Home Location>
-force=<true/false>
The force
flag is by default set to false. The flag is mandatory if the target is subscribed to an image and you still want to switch the database to the emergency home.
Publish The New Version of the Image
The uploaded image is inDRAFT
by default. As the administrator you have to explicitly mark it CURRENT
in order to publish it. This is achieved by the following command:emcli db_software_maintenance
-updateVersionStatus
-version_id=<version_id>
-status=CURRENT
Whereversion_id
is the target version to which the databases are to be patched.
Rollback Emergency Patches
emcli db_software_maintenance
-performOperation -purpose="ROLLBACK_DB"
-target_list="DB1"
-target_type=oracle_database
-name="RollbackDB"
-description="Relocates the DB from inactive CDB to newly active CDB"
-normal_credential="<normal credential>"
-privilege_credential="<host privilege credential>"
-database_credential="<Database credential>"