Is your PDB state saved?

Is your PDB state saved?

This might save you a couple of minutes if you wonder how multitenant works in combination with Oracle Data Guard.

The question I got was, is your PDB state saved after a switchover? The short answer is: Yes it is.

No statements without proving them of course, so here we go.

The primary database:

I have the state of my pub always saved in my post creation script, but you can easily retrieve in what state the PDB will be brought up when the database starts

So this PDB in the primary database will automatically be put in OPEN mode when the database starts. I confirm, it does đŸ˜‰

The standby database, is a simple physical standby database in mount mode

The database is in mount, so that also means we cannot query the dba_pdb_saved_states view.

Then a role switch is performed.

Quickly check it

And indeed, the roles are reversed, so now we can check if the PDB is open or mounted. First of all, the second VM, it was the former standby, now the new primary:

And the PDB is just open in read/write mode. So the old primary, the new standby, we expect the PDB to be mounted:

And it works like expected.

In short, when you reverse the role of the database, the state of the PDB is preserved for the primary database.

As always, questions, remarks? find me on twitter @vanpupi

Leave a Reply

Your email address will not be published. Required fields are marked *

1 + 17 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: