Oracle releases its latest patches for OEL and makes it accessible through its swift object storage. The URL for accessing the patches differs according to the region your Oracle database server is deployed.
Follow the below steps to download the patch repository and apply them to the database server. Here, we would be discussing about how to download the repository , version lock list and update the patches on the server. Post that we would also discuss about how to apply any server level patches using dbcli. Here I have considered the OS as OEL7 for applying the patches.
Step 1: Login as root on the Db server.
Step 2: Create a directory by the name /root/patch_repo on the server and download the latest patch repository from Oracle to the server using below command -
wget https://swiftobjectstorage.us-ashburn-1.oraclecloud.com/v1/dbaaspatchstore/DBaaSOSPatches/oci_dbaas_ol7repo -O /root/patch_repo/oci_dbaas_ol7repo
Step 3: Download the latest version lock list from Oracle Cloud to the server - /root/patch_repo location using below command -
wget https://swiftobjectstorage.us-ashburn-1.oraclecloud.com/v1/dbaaspatchstore/DBaaSOSPatches/versionlock_ol7.list -O /root/patch_repo/versionlock.list
Step 4: Copy the repository to yum repos directory using the below command -
cp /root/patch_repo/oci_dbaas_ol7repo /etc/yum.repos.d/ol7.repo
Step 5: Take a backup of the version lock list and copy the downloaded latest version lock list to the configuration directory using below commands
cp /etc/yum/pluginconf.d/versionlock.list /etc/yum/pluginconf.d/versionlock.list-`date +%Y%m%d`
cp /root/patch_repo/versionlock.list /etc/yum/pluginconf.d/versionlock.list
Step 6: Run the yum update command and press 'Y' for any patches available for update
yum update
Step 7: Post the update, verify if the server needs a reboot using the below command.
needs-restarting -r
Step 8: Reboot the database server from the console if above steps says reboot is required.
Step 9: Post reboot, login as root and update the dcs utilities using the below command.
cliadm update-dbcli
Step 10: Check the status of update using the below command
dbcli describe-job -i "identifier"
Step 11: Once the update is complete, use the below command to find if latest patches are available using the below command. Incase there are no available patches found, our patching activity is successfully complete. If patches are found please proceed for the next step.
dbcli get-availableospatches -j
Step 12: If patches are available, run the below command as a pre-requisite check. Once run, track the status and it should be Success after 100% job completion.
dbcli update-server -c os -p
Step 13: Once the pre-requisite check is successful, run the below command to update the Operating System using the below command and track the status using describe-job command.
dbcli update-server -c os
Step 14: Track the update using the dbcli describe-job command to track the progress and reboot the server if required to complete the patching activity.