In this example a pluggable database PDB1 is cloned to a pluggable database PDB4. All database files are located in /u01/PDB1 which is a zfs filesystem.
First you need to create an xml description of the pluggable database
SQL> alter pluggable database pdb1 close;
SQL> alter pluggable database pdb1 open read only;
SQL> alter session set container=PDB1;
SQL> exec dbms_pdb.describe(pdb_descr_file=>'/u00/pdb1.xml');
Then you have to create the snapshot and clone filesystems:
oracle@devx02e:CDB1:/u00# /usr/sbin/zfs snapshot devx02e_data/u01/PDB1@PDB4
oracle@devx02e:CDB1:/u00# /usr/sbin/zfs clone devx02e_data/u01/PDB1@PDB4 devx02e_data/u01/PDB4
Then create the database using the following commands
SQL> create pluggable database pdb4 AS CLONE using '/u00/pdb1.xml' source_file_name_convert=('/u01/PDB1','/u01/PDB4') nocopy tempfile reuse;
Then you just need to open the pluggable databases:
SQL> alter pluggable database pdbspe1 open force;
SQL> alter pluggable database pdbspe4 open;
[ view entry ] ( 164 views ) | permalink | print article |





<Back | 1 | 2 | 3 | Next> Last>>