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视图可以显示数据库中的可用服务。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM