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

Cause:

You try to open or close a pdb by logging the session to another pdb and not from CDB$ROOT

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

Solution:

Check current logged in pluggable database

SQL> show con_name

CON_NAME
------------------------------
PDB1

Log on to CDB$ROOT container to control all pdbs

SQL> alter session set container=CDB$ROOT;

Session altered.
SQL> show con_name

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

Now try to open the pdb

SQL> alter pluggable database pdb2 open;

Pluggable database altered.

Leave a Reply