Oracle19c常用语句

创建PDB

create pluggable database sc_new file_name_convert=('pdbseed','sc_new ');

克隆PDB

create pluggable database pdb2 from pdb1;

删除PDB

删除PDB之前需要将PDB先关闭,使用drop pluggable database命令,如下:

alter pluggable database sc_new close;

drop pluggable database sc_new including datafiles;

拔出和插入PDB

关闭PDB

alter pluggable database testpdb4 close immediate;

拔出PDB

    拔出PDB的时候指定xml位置,xml中记录了PDB的信息,例如数据文件目录,DBID,PDB参数等等

alter pluggable database testpdb4 unplug into '/home/oracle/testpdb4.xml';

 被拔出的PDB只能被删除,不能做其它操作,例如mount,打开等.    

插入PDB

    使用create pluggable database指定xml位置来插入PDB

create pluggable database testpdb4 using '/home/oracle/testpdb4.xml' nocopy;

V$SERVICES视图可以显示数据库中的可用服务。

posted @ 2021-01-19 16:33  一只竹节虫  阅读(1007)  评论(0编辑  收藏  举报