How to Resolve ORA-65179: cannot keep datafiles for a pluggable database that is not unplugged

  • by

ORA-65179

Let's see a unsuccessful case of dropping a pluggable database (PDB).

SQL> drop pluggable database orclpdb2;
drop pluggable database orclpdb2
*
ERROR at line 1:
ORA-65179: cannot keep datafiles for a pluggable database that is not unplugged

Since the default behavior of dropping a PDB is to keep data files on the server if you don't indicate any further, the only prerequisite is that you should unplug the PDB first before actually dropping it. That's why we saw ORA-65179.

Solution

So the solution is simple, just unplug it before dropping it.

SQL> alter pluggable database orclpdb2 unplug into '/oradata/orclpdb2.pdb';

Pluggable database altered.

In the above example, I unplugged the PDB into an archive file..

SQL> drop pluggable database orclpdb2;

Pluggable database dropped.

There're more ways that can drop a PDB in different situations.

Leave a Reply

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