How to Resolve ORA-65025: Pluggable database is not closed on all instances.

  • by

ORA-65025

ORA-65025 means that the pluggable database should be closed completely before dropping. Let's see a case of dropping a PDB.

SQL> drop pluggable database orclpdb2 including datafiles;
drop pluggable database orclpdb2
*
ERROR at line 1:
ORA-65025: Pluggable database ORCLPDB2 is not closed on all instances.

As error message of ORA-65025 revealed, we should close the PDB before dropping it.

SQL> alter pluggable database orclpdb2 close;

Pluggable database altered.

As you can see, we use ALTER PLUGGABLE DATABASE to close the PDB. For single-instance, you can safely drop the PDB now.

Solution

But for a RAC database like this case, it's not enough.

SQL> drop pluggable database orclpdb2 including datafiles;
drop pluggable database orclpdb2
*
ERROR at line 1:
ORA-65025: Pluggable database ORCLPDB2 is not closed on all instances.

We still got ORA-65025. This is because the PDB is not closed completely at other instances within a RAC database. So the solution is obvious. To close the PDB on all nodes.

SQL> alter pluggable database orclpdb2 close instances=all;

Pluggable database altered.

Now we can drop the PDB.

SQL> drop pluggable database orclpdb2 including datafiles;

Pluggable database dropped.

Leave a Reply

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