Oracle 12c删除PDB

首先需要关闭PDB,然后执行删除命令。

[oracle@server ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Wed Apr 17 14:13:20 2019
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> show pdbs

CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB1 MOUNTED
4 ORCLPDB2 MOUNTED
5 ORCLPDB3 MOUNTED
6 LKAPP_ROOT MOUNTED
7 LKAPP_ONE MOUNTED
8 LKAPP_TWO MOUNTED

SQL> drop pluggable database LKAPP_TWO including datafiles;
Pluggable database dropped.

SQL> drop pluggable database LKAPP_ONE including datafiles;
Pluggable database dropped.

SQL> drop pluggable database LKAPP_root including datafiles;
Pluggable database dropped.

SQL> drop pluggable database ORCLPDB3 including contents and datafiles;
drop pluggable database ORCLPDB3 including contents and datafiles
*
ERROR at line 1:
ORA-02000: missing DATAFILES keyword

SQL> drop pluggable database ORCLPDB3 including datafiles;
Pluggable database dropped.

SQL> show pdbs

CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 ORCLPDB1 MOUNTED
4 ORCLPDB2 MOUNTED
————————————————

posted on 2021-11-10 09:05  数据与人文  阅读(396)  评论(0)    收藏  举报