How to Resolve ORA-65118 Oracle Error Message

  • by

ORA-65118: operation affecting a pluggable database cannot be performed from another pluggable database

When we tried to close a pluggable database (PDB), we got ORA-65118.

SQL> alter pluggable database FINPDB close;
alter pluggable database FINPDB close
*
ERROR at line 1:
ORA-65118: operation affecting a pluggable database cannot be performed from another pluggable database

ORA-65118 means that you went for the wrong pluggable database (PDB) or container to operate with, you can't do operations from another PDB. You should go to check what current container is.

SQL> show con_name

CON_NAME
------------------------------
CRMPDB

As we can see, the current container is not the one we want to close.

Solution

The best solution is to go back to the root container to operate with the PDB.

SQL> alter session set container=CDB$ROOT;

Session altered.

SQL> show con_name

CON_NAME
------------------------------
CDB$ROOT

Now we can do it again.

SQL> alter pluggable database FINPDB close;

Pluggable database altered.

Leave a Reply

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