12C: Multitenant, modify PDB$SEED

#2. PDB$SEED – what it`s it? How to change it structure.

Quick theory:

First let`s start by explaining purpose of PDB$SEED, in few words it`s a template to our newly created PDB (unless we clon it or plugg it from different container).

But what`s the purpose of having template if we can`t modify it?

Well…

it contain basic structure of pluggable databases, tablespaces like SYSTEM or SYSAUX. What if we find a way to mess with it?

Modifying PDB$SEED

Ok, let`s look at v$pdbs view:

1

as we can see PDB$SEED is in READ ONLY unless we change it to READ WRITE mode we can`t modify it`s structure, so how to do it?

We can use hidden parameter “_oracle_script” and set it`s value to TRUE.

1.JPG

as we can see our PDB$SEED is now in READ WRITE mode and we can add schemas, tablespaces which `ll be presented in newly created PDB`s.

Having PDB$SEED in READ WRITE mode doesn`t forbid you from creating new PDB`s.

After all your modifications make sure that you brink PDB$SEED in READ ONLY mode 🙂

At the end of this article let`s ask ourself question why we need this feature?

Personaly i use it when i want to have the same schema in all of my PDB`s, we can use it also when we want to have the same tablespace, table or whatever else in all of our PDB`s.

NOTE.

After restart PDB$SEED is going back to READ ONLY mode.

One thought on “12C: Multitenant, modify PDB$SEED

Leave a comment