HOME > > FAQ-CoreDBA-Patching

FAQ-CoreDBA-Patching

Anup - Monday, April 8, 2024

Oracle FAQ: Patching

1. What is Oracle patching? Patching is the method to applying updates, fixes on Oracle software products to address bugs, security vulnerabilities, and improve performance.

2. How to determine current patch level? It can be determined by querying the DBA_REGISTRY view or by using the opatch utility with the command opatch lsinventory

3. What is the purpose of the OPATCH utility? OPATCH is a utility which uses to apply patches to databases.

4. Explain the difference between a patch set , a patch and Critical Patch Update (CPU)?

A patch set is a collection of patches, including bug fixes and enhancements, bundled together for easier application. A patch,is a smaller update that addresses a specific issue.

The CPU is a quarterly release that contains security fixes for Oracle products.

5. Can you explain the concept of interim patches and recommended patches in Oracle? Interim patches are individual patches provided to fix specific issues, while recommended patches are collections of tested and highly recommended patches for a particular Oracle version.
6. How do you rollback a patch using OPATCH? We can use the `opatch rollback` command followed by the patch ID to revert a patch. This restores the database to its state before the patch was applied.
7. What precautions should be taken before applying patches to an Oracle database in a production environment? Before applying patches, it's essential to backup the database, review the patch documentation, test the patch in a non-production environment, and notify stakeholders about the planned downtime.
8. How can you check for prerequisites before applying a patch? The `opatch prereq CheckConflictAgainstOHWithDetail` command can be used to check whether a patch is applicable and if there are any conflicts or prerequisites that need to be addressed.
9. What are the steps involved in applying a patch to an Oracle database? Reviewing patch documentation. Verifying prerequisites. Backing up the database. Applying the patch using tools like opatch. Post-patch tasks such as running scripts or applying additional configurations.
10. How do you ensure minimal downtime during the patching process? If we are using RAC or ODG we can use the rolling patch method.

11. How to Handle Patch Conflict Detection and Resolution?

1. OPatch automatically detects and reports the conflicts before the start patching.

2. We can use the -force option to override this failure. But generally , we must not use -force option.

3. If we specify -force, the installer first rolls back any conflicting patches and then proceeds with the installation of the desired interim patch.

4. We may experience a bug conflict and might want to remove the conflicting patch.

5. During patch installation, OPatch saves copies of all the files that were replaced by the new patch before the new versions of these files are loaded, and stores them in $ORACLE_HOME/.patch_storage.

6. These saved files are called rollback files and are key to making patch rollback possible.

7. When you roll back a patch, these rollback files are restored to the system.

8. $ OPatch/opatch rollback -id patch_id

12. What happens if $ORACLE_HOME/.patch_storage/..." does not exists or is not readable?

1. In this case, we can not rollback the patches. Only supported solution is The missing directories and files can be restored from a backup of the ORACLE_HOME.

2. If no backups exist then re-install the $ORACLE_HOME.

3. Clone from another ORACLE_HOME of a like installation.

14. catbundle.sql vs datapatch

We use catbundel.sql in 11g agetr after 12c we user "datapatch" tool , which is located in the OPatch directory. It has to be executed after you applied a patch bundle as there may be for instance changes to a PL/SQL package or function.

Contact me

Get in Touch

Need to get touch with me? Please fill out the form with your enquiry.

Name
Anup Srivastav
Address
Lucknow - Utter Pradesh
Email
myindiandba@gmail.com
Message me