Wednesday, April 5, 2023

Orcale database patching techniques

 Out-of-Place Oracle Database Patching and Provisioning Golden Images


Visit more in my professional group on LinkedIn:

https://www.linkedin.com/groups/8151826


There are some traditional methods for upgrading and patching orcale dataabse, such as offline or online solutions.

DBAs always have a challenging on this way to do this by minimizing downtime.

A good option alwayis using Orcale Goldengate features for online upgrades that might be better in some situations, but totally select a best method is related to another parameters such as current version of DB, SLA contracts, RTO/RPO, work load, resource limitations, type of applications that used database, database size, human experiences, and so on.


Orcale always going on to simplify this method and in newer versions we see these features.


Also in the previous posts I explained some useful features such as Orcale Fleep Patching and Provisioning that made easy in multi instances and cloud base environments.


 Here, I demonstrated another useful concept and solution for doing that.


These features are available on Multitenant databases 12c above and was better in newer as 19c, 21c,... and with newer versions manuall interference by DBAs reached in minimum with minimal total times of upgrade.

Lets go.


Introduction:

Oracle Database is a widely used database management system that requires regular patching to ensure security, stability, and performance improvements. 

Out-of-place patching is a recommended approach, and creating golden images helps streamline the process. This essay will explain the steps involved in out-of-place Oracle database patching, creating golden images for Oracle Home and Grid Home, and provisioning Oracle features using the -apply_ru option.


1. Out-of-Place Oracle Database Patching:


Out-of-place patching involves creating a new Oracle Home and applying patches to it rather than modifying the existing installation. This approach minimizes downtime and allows easy rollback if any issues arise. Here's a step-by-step example:


   a. Obtain the required patch set from Oracle's support website.

   b. Unzip the patch set files to a temporary directory.

   c. Create a new Oracle Home directory where the patched database will reside.

   d. Install Oracle software binaries into the new Oracle Home.

   e. Use the Oracle Universal Installer (OUI) to apply the patch set to the newly created Oracle Home.

   f. Update the database's Oracle Inventory (oraInventory) to reflect the new Oracle Home.


2. Creating Golden Images for Oracle Home and Grid Home:


Creating golden images involves cloning an existing Oracle Home and Grid Home installation, which serves as a template for future installations. This approach ensures consistency and reduces manual effort. Here's an example of creating a golden image:


   a. Stop all relevant services and processes related to the Oracle Home or Grid Home.

   b. Create a backup of the existing Oracle Home or Grid Home using tools like Oracle Recovery Manager (RMAN) or file system-level backups.

   c. Clone the backup to a new location or server, preserving the directory structure and permissions.

   d. Update configuration files, such as listener.ora and tnsnames.ora, to reflect the new environment.

   e. Start the services and verify the cloned Oracle Home or Grid Home.


3. Patching and Provisioning Oracle Features:


After creating the golden image, you can use the `-apply_ru` option to apply patch sets and provision additional Oracle features. Here's a brief example:


   a. Obtain the required patch set or feature pack from Oracle's support website.

   b. Unzip the patch set or feature pack files to a temporary directory.

   c. Run the patching command, specifying the Oracle Home or Grid Home to be patched, along with the `-apply_ru` option.

   d. Follow the prompts and provide any necessary information during the patching process.

   e. Once the patching is complete, verify the success of the patch installation by checking the logs and running appropriate tests.


Conclusion:

Out-of-place Oracle database patching, creating golden images for Oracle Home and Grid Home, and provisioning Oracle features are crucial steps to ensure a secure and stable database environment. By following the provided example and best practices, organizations can minimize downtime, maintain consistency, and apply patches and features efficiently.


Do you know better solutions to upgrading database?



Regards,

Alireza Kamrani

Senior RDBMS Consultant.

No comments:

Post a Comment

Oracle ASM/AFD disks automotive script

Oracle ASM/AFD disks automotive script                           Alireza Kamrani.                               06/28/2024 Creating partitio...