I strongly recommend that you always patch out-of-place. Here’s an example of how to do it on Oracle Restart and Oracle Data Guard.
This procedure is very similar to patching without Oracle Data Guard, so I’ll often refer to a previous blog post.
My demo system
- Data Guard setup with two single instance databases in Oracle Restart configuration
- GI and database home are currently on 19.24
I want to:
- patch to 19.25
- patch both the GI and database home in one operation
Preparation
-
I download the same patches are mentioned in the Preparations.
-
I place the software in /u01/software which is an NFS share accessible to both servers.
How to Patch Oracle Restart 19c and Oracle Database
1. Prepare a New GI Home
I can do this in advance. It doesn’t affect my current environment and doesn’t cause any downtime.
-
I perform Step 1. Prepare a New GI Home on both hosts.
-
This could be a good place to use golden images.
2. Prepare a New Database Home
I can do this in advance. It doesn’t affect my current environment and doesn’t cause any downtime.
-
I perform 2. Prepare a New Database Home on both hosts.
-
Again, golden images is to your benefit.
3. Prepare Database
I can do this in advance. It doesn’t affect my current environment and doesn’t cause any downtime.
- I perform 3. Prepare Database on both hosts.
4. Standby Database: Switch to the New GI and Database Homes
Now, I can complete the patching process on the standby database by switching to the new Oracle homes.
-
I perform 4. Switch to the New GI and Database Homes on the standby host.
-
There is no downtime on the primary database. But the standby database will be shortly down which might mean something to you if you use Active Data Guard.
-
I make sure the standby database is brought back to the desired mode (mount or open). I check redo apply is running.
5. Primary Database: Switch to the New GI and Database Homes
Next, I can complete the patching process on the primary database by switching to the new Oracle homes.
-
I perform 4. Switch to the New GI and Database Homes on the primary host.
-
This means downtime.
6. Complete Patching
Now, both databases in my Data Guard configuration run out of the new Oracle Homes.
Only proceed with this step once all databases run out of the new Oracle Home.
-
I perform the steps from 5. Complete Patching.
-
I only run Datapatch on the primary database. I can do that while users are connected. The standby database applies the Datapatch changes when they arrive in redo.
That’s it! I have now patched my Oracle Restart and Data Guard deployment.
Happy Patching!
Appendix
Check the appendix in the related blog post for additional information and troubleshooting.
Further Reading
- Database Installation Guide for Linux 19c, Patching and Switching Oracle Grid Infrastructure Homes
- Introduction to Patching Oracle Data Guard (without Oracle Restart)
Other Blog Posts in This Series
- Introduction
- How to Patch Oracle Grid Infrastructure 19c Using In-Place OPatchAuto
- How to Patch Oracle Grid Infrastructure 19c Using Out-Of-Place OPatchAuto
- How to Patch Oracle Grid Infrastructure 19c Using Out-Of-Place SwitchGridHome
- How to Patch Oracle RAC Database 19c Using Manual Out-Of-Place
- How to Patch Oracle Grid Infrastructure 19c and Oracle Data Guard Using Standby-First
- How to Patch Oracle Grid Infrastructure 19c Using Zero Downtime Oracle Grid Infrastructure Patching
- How to Patch Oracle Restart 19c and Oracle Database Using Out-Of-Place Switch Home
- How to Patch Oracle Restart 19c and Oracle Data Guard Using Out-Of-Place Switch Home
- Which Method Should I Choose When Patching Oracle Grid Infrastructure 19c
- How to Avoid Interruptions When You Patch Oracle Grid Infrastructure 19c
- Patching Oracle Grid Infrastructure And Oracle Data Guard
- How to Clone Oracle Grid Infrastructure Home Using Golden Images
- How to Roll Back Oracle Grid Infrastructure 19c Using SwitchGridHome
- How to Remove an Old Oracle Grid Infrastructure 19c Home
- Use Cluster Verification Utility (cluvfy) and Avoid Surprises
- A Word about Zero Downtime Oracle Grid Infrastructure Patching
- Why You Need to Use Oracle Fleet Patching and Provisioning
- My Best Advice on Patching Oracle Grid Infrastructure
- Pro Tips
Hi Daniel. Is it possible oracle provides a solution which in one conteiner we have 2 pdb with 2 different version ? Another question is, is there a solution which in a cdb container, by issuing a command a specific user with his schema objects and data move from one pdb to another pdb? It is so useful because the data files are in one place, and it does not need to move segments. But all data dictionaries, which are pretty small they can move from one pdb to another pdb. By these capability, we will be able to move data between 2 pdb without any latency.
Best regards
Oscar
LikeLike
Hi Oscar,
No, it is not possible to have two PDBs on different version/patch level in the same CDB. All PDBs in a CDB must use the same release/patch level as the CDB.
If you need to move an entire schema, metadata and data, you should use Data Pump. It can go across database link which can be handy. If you want to share metadata, you can have a look at Application Containers.
Regards,
Daniel
LikeLike