Steps to decommission of PDBs :
Connect to container database :
oracle $ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Mon Mar 23 08:19:41 2020
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 – 64bit Production
Connect to pluggable database :
SQL> alter session set container=TESTPDB;
Session altered.
SQL> select username from gv$session where status=’ACTIVE’ and username!=’SYS’;
no rows selected
Set CLUSTER_DATABASE parameter to FALSE :
SQL> alter system set cluster_database=FALSE scope=spfile sid=’*’;
System altered.
oracle (TESTCDB2)$ srvctl stop database -d TESTCDB
prod02:/home/oracle
oracle (TESTCDB2)$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Thu Feb 6 16:16:43 2020
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount exclusive restrict
ORACLE instance started.
Total System Global Area 1.2885E+10 bytes
Fixed Size 15885056 bytes
Variable Size 3489664256 bytes
Database Buffers 9361686528 bytes
Redo Buffers 17666048 bytes
Database mounted.
SQL> show parameter db_uni;
NAME TYPE VALUE
———————————— ———– ——————————
db_unique_name string TESTCDB
SQL> drop database;
Database dropped.
oracle (TESTCDB2)$ srvctl remove database -d TESTCDB
Remove the database TESTCDB? (y/[n]) y