A PDB snapshot is a named copy of a PDB at a specific point in time. When a PDB is enabled for PDB snapshots, you can create up to eight snapshots of it. The set of snapshots is called a snapshot carousel. PDB Snapshot Carousel is a new feature of Oracle Database 18c. When maximum limit of 8 snapshots of PDB is reached, then  new snapshot overwrite the oldest copy.

PDB snapshot carousel keeps the external log for the purpose of using it in the following cases:

  • Generate non-productive environments.
  • Recovery of a Productive PDB before a problem.

The snapshots include the copy of the data files of the original PDB, excluding the archived redo logs. This instant copy is stored on disk and by default it is in the same directory as the datafile.

Snapshot Configuration of a PDB:

The MAX_PDB_SNAPSHOTS property specifies the maximum number of snapshots permitted in the carousel. The current setting is visible in the CDB_PROPERTIES view.

You can change the maximum PDB snapshot value and setting value to Zero will drop all the snapshots.

Create PDB snapshots Manually:

A snapshot will be executed manually as below. System generated name is created. It is possible to create a snapshot with a specific name as well.

Configure automatic PDB snapshot :

It is possible to perform snapshot programming automatically. Example to create snapshot every 24 hours.

You can specify value which should be less than:
• 3,000 if expressed in minutes.
• 2,000 if expressed in hours.

Disable and Remove Snapshots:

It is possible to disable the taking of snapshots.

You can drop a particular snapshot.

All snapshot files will be deleted automatically when they are set the property MAX_PDB_SNAPSHOTS to 0.

Creating a PDB from a Snapshot:

PDB snapshots generate full copies of the data files of the original PDB allowing to create new PDBs independently from the original.

You can also create a snapshot copy PDB by using snapshot.

A snapshot copy PDB and a PDB snapshot created with the “USING SNAPSHOT” clause are distinct types of snapshots.When creating a snapshot copy PDB, Oracle Database does not make a complete copy of the source data files. Rather, Oracle Database creates a storage-level snapshot of the underlying file system, and then uses the storage snapshot to create a PDB clone.

So oracle Database 18c brings excellent functionality which can be used to create new non-prod pdb’s and also can be used to do immediate point in time restores for production databases.

Mandy!!!

 

 

Leave a Reply