Wednesday, September 30, 2020

Remove oracle PDB$SEED from migrate mode.

                 I was working on applying quarterly patches on the oracle database 12c and once the patch was applied happened to notice PDB$SEED was in migrate mode. I will share a few steps about how to remove PDB$SEED from migrate mode and bring it to normal read-only mode, you can use the same steps for both standalone and RAC.

SYS@sajiddb1>show pdbs;

CON_ID CON_NAME    OPEN MODE    RESTRICTED

----- ----------- ------------ ------------

 2     PDB$SEED     MIGRATE         NO

 3     SAJIDDB_PDB  READ WRITE      NO


You will see the error message already registered in the DB alert log as below:

Database Characterset for PDB$SEED is AL32UTF8

*******************************************************

WARNING: Pluggable Database PDB$SEED with pdb id - 2 is

         altered with errors or warnings. Please look into

         PDB_PLUG_IN_VIOLATIONS view for more details.

********************************************************

Opening pdb PDB$SEED (2) with no Resource Manager plan active

Pluggable database PDB$SEED opened migrate


SYS@sajiddb1>alter session set "_oracle_script"=TRUE;

session altered

SYS@sajiddb1>alter pluggable database pdb$seed close immediate instances=all;

Pluggable database altered.

SYS@sajiddb1>alter pluggable database pdb$seed OPEN READ ONLY force;

Pluggable database altered.

SYS@sajiddb1>alter session set container=PDB$SEED;

session altered

SYS@sajiddb1>show pdbs;

CON_ID  CON_NAME     OPEN MODE   RESTRICTED

------ ------------ ----------- ------------

 2       PDB$SEED     READ ONLY    NO

SYS@sajiddb1>alter session set "_oracle_script"=FALSE;

session altered