OEM Fleet Maintenance – Apply a Patch

Create a New Image Version and then Patch a Subscribed database

On DB1, we have patched with OPatch. Here is the inventory.

Next Refresh the Oracle Home. See the patch just applied in OEM

Now create the new image version. Note the reference to the existing IMAGE_ID creates a new version of that image.

emcli login -username=sysman
emcli db_software_maintenance -createSoftwareImage -input_file="data:/home/oracle/scripts/input12_p2" 

File input12c_p2

IMAGE_ID=87313772D0AF17F2E0530402320A85BD
REF_TARGET_NAME=OraDB12Home1_1_db1.dbtier.demo.oraclevcn.com_1532
REF_HOST_CREDENTIALS=ORACLE:SYSMAN
WORKING_DIRECTORY=/u01/working
STORAGE_TYPE_FOR_SWLIB=OmsShared
STORAGE_NAME_FOR_SWLIB=default_loc
IMAGE_SWLIB_LOC=_FLEET/12.1.0.2/TestingP1
VERSION_NAME=12.2-190430-P2

When you submit the command, it will return a URL to use in OEM to monitor the deployment procedure. Additionally, you can simply go to Enterprise->Provisioning and Patching->Procedure Activity. You can find the procedure and see the steps executed.

Next get the image versions. Note the new DRAFT version.

Make the new version the current.

emcli db_software_maintenance -updateVersionStatus -version_id=88F8ADA4DD7C2515E0530402320A4CC3 -status=CURRENT

Check Applicability of the image to orcl3.dbtier.demo.oraclevcn.com

emcli db_software_maintenance -checkApplicability -image_id=87313772D0AF17F2E0530402320A85BD -target_list=OraDB12Home1_1_db3.dbtier.demo.oraclevcn.com_1532 -target_type=database

Now Update orcl3.dbtier.demo.oraclevcn.com



dbp2.txt is -
NEW_ORACLE_HOME_LIST=/u01/app/oracle/app/product/12.2.0.1.0p2/db
workingDir=/u01/working
dispatchLoc=/u01/root

Push the Software

emcli db_software_maintenance -performOperation -name=deploydbsw2 -purpose=DEPLOY_DB_SOFTWARE -target_type=oracle_database -target_list=orcl3.dbtier.demo.oraclevcn.com -normal_credential="ORACLE:SYSMAN" -privilege_credential="ROOT2:SYSMAN" -input_file="data:/home/oracle/scripts/dbp2.txt"

Migrate the Listener

emcli db_software_maintenance -performOperation -name=MigrateListener -purpose=migrate_listener -target_type=oracle_database -target_list=orcl3.dbtier.demo.oraclevcn.com -normal_credential="ORACLE:SYSMAN" -privilege_credential="ROOT2:SYSMAN"

Move the Database to the New Home

emcli db_software_maintenance -performOperation -name=UpdateDB -purpose=UPDATE_DB -target_type=oracle_database -target_list=orcl3.dbtier.demo.oraclevcn.com -normal_credential="ORACLE:SYSMAN" -privilege_credential="ROOT2:SYSMAN" -database_credential="SYS:SYSMAN"

By default 3 Oracle Homes are retained. For more information on how to homes are deleted, see Cleaning up Oracle Homes – https://docs.oracle.com/cd/cloud-control-13.3/EMLCM/GUID-60B39D16-322B-435F-85F0-C39AFC80E96B.htm#EMLCM-GUID-B4B7CC55-15AC-4D81-8D13-450CB9595AC1

Leave a Reply

Your email address will not be published. Required fields are marked *

I accept that my given data and my IP address is sent to a server in the USA only for the purpose of spam prevention through the Akismet program.More information on Akismet and GDPR.