Skip to content
Home » Oracle Database » How to Resolve ORA-65011: Pluggable database does not exist

How to Resolve ORA-65011: Pluggable database does not exist

ORA-65011

There're several use cases that may throw ORA-65011.

Switch Session Container

Tried to set a PDB as the current session container, but it failed with ORA-65011.

SQL> alter session set container=ORCLPDB;
ERROR:
ORA-65011: Pluggable database ORCLPDB does not exist.

Such error is most likely a typo issue.

Open or Close a PDB

Tried to open a pluggable database (PDB), but it failed with ORA-65011.

SQL> alter pluggable database ORCLPDB open;
alter pluggable database ORCLPDB open
*
ERROR at line 1:
ORA-65011: Pluggable database ORCLPDB does not exist.

ORA-65011 means that the PDB you specified does not exist in container database (CDB). You should make sure both CDB and PDB are correct.

I guess you may either go for the wrong container or misspell the PDB name.

Solutions to ORA-65011

To solve ORA-65011, we can take one of the following ways.

  1. Get into the right container
  2. Use correct the PDB name
  3. Open the root container

Right CDB

Let's check which CDB we're currently in.

SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT
SQL> select name from v$database;

NAME
---------
ORA19C1

Chances are, you might go for the wrong CDB, the root container may not be the right one. You should go for the right CDB. Here we supposed that the right CDB is ORA19C2

If you're in the database server, you can do this.

[oracle@test ~]$ export ORACLE_SID=ORA19C2
[oracle@test ~]$ echo $ORACLE_SID
ORA19C2
[oracle@test ~]$ sqlplus / as sysdba

If you're using tool to connect the database, you should connect with the right CDB again.

C:\Users\scott>sqlplus sys@ORA19C2 as sysdba

Then do the open statement again.

Right PDB

Possibly, you misspelled the PDB name or it has been dropped. let's list all PDB in this CDB.

SQL> show pdbs;

    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDBX                       MOUNTED

Eventually, the PDB name is different from the one we thought. We should use the right PDB name to open with.

SQL> alter pluggable database ORCLPDBX open;

Pluggable database altered.

Open CDB

If you're pretty sure the PDB name is correct, your root container might be at NOMOUNT, you should OPEN it by two steps.

SQL> alter database mount;

Database altered.

SQL> alter database open;

Database altered.

As for how to know what state the database currently is, you may take a look.

4 thoughts on “How to Resolve ORA-65011: Pluggable database does not exist”

  1. Hello,

    I cloned our prod (EBS) database to DEV. After successfully changing the PDB name (alter pluggable database rename global_name …) from PROD to DEV, when I tried to a ‘shutdown immediate’, I get the following error :

    “ORA-65011: Pluggable database PROD does not exist”

    Not sure where the name PROD is still stored.

    show con_name => returns DEV correctly.

    After connecting to the root container (CDB$ROOT), when I query v$containers, it rightly shows the following 3 :

    CDB$ROOT
    PDB$SEED
    DEV

    Maybe due to some improper environment setting or something ?

Leave a Reply

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