We have a client that has multiple applications in one database (I know), each separated into different tablespaces. We inherited this and they want to stick to it.
The problem is that we haven't been able to patch for years because although some applications say we can, others say not yet.
I thought a solution might be to use pluggable databases. They have an existing V19C SE database which is not a container DB.
The theory is that we create a Container database and patch that to the latest release, then migrate the applications that can be patched into pluggable databases - we can export / import initially and then use the pluggable features to move the databases.
Eventually we'll have all the applications in their own pluggable database in the container running the latest patch, with the original non-container database now not in use. We drop that, recreate it as a container database and leave it empty.
The next patch comes out, we patch the empty one and then unplug and plug in the application PDBs that are able to be patched.
Eventually all the application PDBs will be in this updated one, the other one empty and we just rinse and repeat.
There are a a couple of issues - first, we need enough space on the host to install another ORACLE_HOME. Second, Oracle allows 3 PDBs in a container DB for free - any more and a license is needed. Note: during testing I discovered that Standard Edition (which the client is running) is limited to 2 PDBs, so I suspect this idea isn't going to fly.
I did wonder about application connectivity, but we should be able to use the same service name, especially since the databases are on the same host.
They use VM snapshots for DR, so that won't be a problem, but if DataGuard was running we'd need to consider that as well, some config changes would probable be needed, or the configuration may need recreating each time. You'd also probably want 2 separate listeners.
On to the testing. I created a new VM (I use Proxmox) with enough space for 2 ORACLE_HOMEs, and installed V19 in each.
I then created a database in each home, one was a container, one was non container to replicate the existing client database. I then patched the container database to the n-1 release (April 2024).
I created 3 tablespaces, then 3 tables, in the non-container database to simulate the different applicants in the client environment.
I tried to create 3 PDBs in the container database, but Standard Edition is limited to 2.
So there is now a PDB with the data from the source data1 tablespace. I repeated the process for data2.
So there are now 2 PDBs with the data from the source. The applications can now be pointed to this, the database is a recent patch.
You can now drop the source pluggable database, then clone the other one when it's ready to move to the latest patched database and drop that.