Why does a PDB require an upgrade?

Why do I need to upgrade (or downgrade) a Pluggable Database (PDB) once I unplug it from version A and replug into version B?

This question is one of the most often asked questions in our workshops when Roy and I present Upgrades and Oracle Multitenant.

If you take a look into the documentation you’ll find:

But unfortunately this is not 100% correct for every object.

When you do a simple query for basic dictionary structures such as OBJ$ you’ll easily find out that a PDB has its own Data Dictionary.  Some things are really linked into the PDB only – check the SHARING column of DBA_OBJECTS for instance. If it says “METADATA LINK” it will give you an indication that it exchanges information with its parent in the CDB$ROOT. But that doesn’t mean necessarily that it’s just an empty meta object. Some tables do exist in the PDB as well and allocate space. Check it by yourself and you’ll find out that OBJ$ inside a PDB has in fact the same attribute – but still owns segments in the PDB and in the CDB$ROOT – as other objects do allocate space as well. And of course the object’s definition exists in the PDB as well.

  • CDB$ROOT
    OBJ$ in CDB$ROOT
  • PDB
    OBJ$ in PDB

So the answer is simple:

A Pluggable Database (PDB) must be upgraded (or downgraded) when it get moved between versions simply because it has its own data dictionary. And this doesn’t get upgraded automatically.

–Mike

Share this: