Skip to content
Home » Oracle » How Oracle Enable PDB Restricted Mode

How Oracle Enable PDB Restricted Mode

  • Oracle

We can enable the restricted mode of a PDB either in CDB or PDB.

In CDB

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

Check Current Status

[oracle@test ~]$ sqlplus / as sysdba
...
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 NO

Enable Restricted Mode

Here we use OPEN RESTRICTED FORCE to enable restricted mode.

SQL> alter pluggable database ORCLPDB open restricted force;

Pluggable database altered.

When PDB is MOUNTED

When the PDB is not open, then you don't specify FORCE.

SQL> alter pluggable database ORCLPDB open restricted;

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 YES

As you can see, RESTRICTED is now YES.

In PDB

In a PDB, you can enable its restricted mode like a normal, typical database (non-CDB).

Later on, after finishing maintenance works, you may consider to disable restricted mode on the PDB and open to public.

Leave a Reply

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