在unplug一个pdb的时候,如果将扩展名定义为.pdb,oracle就会创建一个.pdb归档文件。包含pdb数据文件和xml元数据文件的压缩文件。创建archive file之后,就不用分开拷贝数据文件和xml文件了。
SQL> alter pluggable database db12pdb1 unplug into '/home/ora12/db12pdb1.pdb'; Pluggable database altered. SQL> !ls -l /home/oracle total 157988 -rw-r--r-- 1 oracle oinstall 161723923 Nov 6 10:58 db12pdb1.pdb SQL> !unzip -t db12pdb1.pdb Archive: db12pdb1.pdb testing: system01.dbf OK testing: sysaux01.dbf OK testing: undotbs01.dbf OK testing: users01.dbf OK testing: /home/oracle/db12pdb1.xml OK No errors detected in compressed data of db12pdb1.pdb. SQL> create pluggable database db12pdb1 as clone using '/home/oracle/db12pdb1.pdb' file_name_convert=('/home/oracle/','/u12/app/oracle/oradata/orcl/db12pdb1') ; Pluggable database created. SQL>