1 說明
When a pluggable database (PDB) is unplugged, all data files associated with a PDB along with the PDB manifest need to be copied or moved individually over to the remote server where it is plugged into another multitenant container database (CDB). With this new feature, a you can choose to create a single PDB archive file, a compressed file with the .pdb extension, that contains the PDB manifest and all of the data files when unplugging a PDB. When plugging in a PDB, the presence of a .pdb file is interpreted and the PDB is plugged into the CDB. You can choose to run the PDB plug-in compatibility test directly on the PDB archive without extracting the PDB manifest file from the archive.
從12.2有了這個新功能,你可以選擇建立一個單一的PDB歸檔檔案,一個帶有.pdb擴充名的壓縮檔案,其中包含PDB中繼資料和PDB的所有資料檔案。
這個功能很實用,大大減少了遷移PDB的複雜性。
圖1 拔出PDB
2 實驗
2.1 Unplug PDB
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
3 LEI1 MOUNTED
4 LEI2 MOUNTED
5 SIHONG MOUNTED
6 CNDBA_PDB_REF MOUNTED
- 導入到歸檔檔案中(.pdb)
SQL> alter pluggable database sihong unplug into '/software/backup/sihong.pdb';
Pluggable database altered.
- 看看檔案大小
[oracle@db12CR2 backup]$ ll -h
total 440M
-rw-r--r-- 1 oracle oinstall 440M Aug 8 11:40 sihong.pdb