Database Migration from non-CDB to PDB – The COMPATIBLE pitfall

There are several pitfalls when you plugin a non-CDB into a CDB environment. I’d like to highlight some of them – and show you potential workarounds as well. This is part of a series of blog posts to make your migration from non-CDB to PDB a bit smoother.

Database Migration from non-CDB to PDB - The COMPATIBLE pitfall

Database Migration from non-CDB to PDB – The COMPATIBLE pitfall

When you migrate your non-CDB to PDB, in most cases the COMPATIBLE setting of the non-CDB will be lower than the setting of the receiving CDB. But still in this case you may see warnings. I will explain how to deal with the different situations – and where you need to pay attention and adjust your settings.

See also the related blog posts regarding potential plugin pitfalls with Database Migration from non-CDB to PDB:

Different Compatible warnings and errors

Actually there can be two sorts of COMPATIBLE warnings: Those which don’t tell you anything. And those which tell you a lot. How do you differ between these two? See below.

The first example is a message you may see in typical situations.

When I try to plugin a non-CDB into a 19.3.0 CDB I receive this WARNING in PDB_PLUG_IN_VIOLATIONS when doing the plug compatibility check:

------ -------- --------- -------------------------------------------------- ---------
     1 DB12	...       ...
     1 DB12	WARNING   CDB parameter compatible mismatch: Previous '12.2. PENDING
			  0' Current '19.0.0'

It is good to get this WARNING as it tells me that my COMPATIBLE setting will be lifted to 19.0.0. Doesn’t it?

Well, you need to be aware, whenever you plugin, that the COMPATIBLE setting of the receiving CDB matters. And PDBs you plug in, automatically get COMPATIBLE adjusted once the CDB has a higher level. Of course, you can’t plugin a PDB which has a higher COMPATIBLE level than the receiving CDB.

But here we deal with a non-CDB. Is this an issue? No. But the warning should tell you correctly “Be aware, your COMPATIBLE setting for the non-CDB will be lifted to 19.0.0 - and this change is irreversible.“.

Let me do a quick experiment with my non-CDB. I upgraded it to Oracle 19c already.

alter system set compatible='' scope=spfile;
startup force

You may remember my blog post where I clearly recommended to let COMPATIBLE always on the default for 18c and 19c – and with 3 digits only. I will redo the DESCRIBE and plugin compatibility check after I increased the COMPATIBLE setting for my non-CDB.

Now I receive a clear ALERT (or ERROR):

------ -------- --------- -------------------------------------------------- ---------
     1 DB12	ERROR	  PDB's compatible version is not allowed in the CDB PENDING
			  : PDB's compatible parameter CDB's com
			  patible parameter, plug in is not allow

     1 DB12	WARNING   CDB parameter compatible mismatch: Previous '19.1. PENDING
			  0.0.0' Current '19.0.0'

You can’t plugin. Nothing to discuss here.

Summary and Recommendation

It is very simple but still you need to pay attention, especially in regards to the application you run in the non-CDB. Be aware that COMPATIBLE gets always lifted to the value of the CDB you plug into. And be VERY aware that this is a silent change, especially if you don’t do the plug compatibility check upfront. This applies to plugging in non-CDBs as well as to PDBs.

And obviously, you can’t plug in a non-CDB or PDB with a higher COMPATIBLE setting than the receiving CDB. As a general rule, I would keep the COMPATIBLE setting across all my CDBs the same until you have all your environments on a higher level completely. This means, once you have a mix of, 18c and 19c CDBs, you either should pay close attention to COMPATIBLE or you better keep it everywhere at “12.2.0” unless all your PDBs are on a higher release. For non-CDB migration, this has no impact as you can’t revert to non-CDB anyway after you plugged in.

Just a final recommendation: Don’t set COMPATIBLE to values such as “” or “18.3.0“. This will make your life just harder and more complicated. Keep it with 3 digits only – and don’t adjust if for RU or RUR levels. This has no effect and makes no sense. Even the feature Oracle In-Memory didn’t require to change COMPATIBLE to “” – if you had COMPATIBLE on “12.1.0” you were all set.

And as people have pointed me to this, be also aware that especially some ASM features such as FLEX and EXTENDED disk groups and Fast Mirror Resync require COMPATIBLE.RDBMS = In this case you need to advance the compatibility when you migrate from releases older than 12.2..

Typical Plugin Issues and Workarounds

Related Posts


Share this: