Create a PDB snapshot carousel

From Robs_Wiki
Revision as of 09:50, 18 October 2020 by Qadmin wiki (talk | contribs) (Example 1 create a manual snapshot and create a new PDB from that snapshot)
Jump to: navigation, search


This feature allows you to make instant snapshot copies of the Pluggable Database (PDB) and keep them in an external binnacle. A PDB snapshot is an archive file (.pdb) compromising of a a copy of PDB snapshot content. You can have a maximum of 8 snapshots per PDB. On reaching the limit, older copies will be overwritten as new instant copies are required.

  • Snapshots differ from copy PDB snapshots, which are sparse copies.
  • Snapshots will always depend on the CDB where they are hosted.
  • You cannot create the snapshot from the root container. You must be connected to the PDB itself
  • The database does not HAVE to running in archive log mode.

Example 1 create a manual snapshot and create a new PDB from that snapshot

SQL> select property_value from database_properties where property_name = 'MAX_PDB_SNAPSHOTS';


SQL> alter pluggable database pdb1 snapshot pdb1_first_snap;

Pluggable database altered.

SQL>  select con_name, snapshot_name, snapshot_scn, snapshot_time, full_snapshot_path from cdb_pdb_snapshots;

---------- ------------------------------ ------------- ---------------------
PDB1     PDB1_FIRST_SNAP  15656372    1602932322 /u01/app/oracle/oradata/snap_3499944333_15656372.pdb

SQL> show parameter db_create_file_dest

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_create_file_dest                  string      /u01/app/oracle/oradata

SQL> alter session set container=cdb$root;

Session altered.

SQL> create pluggable database snap1_pdb1 from pdb1 using snapshot pdb1_first_snap;

Pluggable database created.