Skip to content
Home » Oracle » How to Remove PDB from Restricted Mode

How to Remove PDB from Restricted Mode

To remove the restricted mode from PDB, we can do it either in CDB or PDB. In fact, disabling the restricted mode is just a reverse process of enabling restricted mode of a PDB.

If it was a newly cloned or created PDB and it fell in restricted mode every time you tried to open it normally, then you should check the following post: How to Resolve "Warning: PDB altered with errors.".

Remove PDB Restricted Mode in CDB

Disabling the restricted mode of a PDB in the root container is the easiest way to do it.

Check Current Status

SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT
SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDB                        READ WRITE YES

Disable Restricted Mode

Here we use OPEN FORCE to leave restricted mode and go back to normal READ WRITE.

SQL> alter pluggable database ORCLPDB open force;

Pluggable database altered.

Check Current Status Again

SQL> show pdbs

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDB                        READ WRITE NO

As you can see, RESTRICTED is now NO.

Remove PDB Restricted Mode in PDB

In a PDB, you can also leave the restricted mode like a normal, typical database (non-CDB).

4 thoughts on “How to Remove PDB from Restricted Mode”

  1. hi, i keep getting this

    show pdbs;

    CON_ID CON_NAME OPEN MODE RESTRICTED
    ———- —————————— ———- ———-
    2 PDB$SEED MIGRATE YES
    3 PDB1 MIGRATE YES
    SQL> alter pluggable database pdb1 open force;
    alter pluggable database pdb1 open force
    *
    ERROR at line 1:
    ORA-65054: Cannot open a pluggable database in the desired mode

    1. First, OPEN FORCE cannot be used for MIGRATE, you may check the documentation for sure. Second, you should close it before opening it.

  2. Good morning.

    SQL> alter session set container=orclpdb;
    Session altered.
    SQL> alter pluggable database open;
    Warning: PDB altered with errors.
    I cannot be allowed to connect to HR.

    SQL> alter session set container=cdb$root;
    Session altered.
    SQL> show pdbs
    CON_ID CON_NAME OPEN MODE RESTRICTED
    ———- —————————— ———- ———-
    2 PDB$SEED READ ONLY NO
    3 ORCLPDB READ WRITE YES
    4 ORCLPDB2 MOUNTED
    5 ORCLPDB4 MOUNTED
    6 ORCLPDB6 MOUNTED

    and ORCLPDB is restricted.

Leave a Reply

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