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

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s