Skip to main content
Delphix

How to list Snapshots used by Virtual Databases (VDBs)

Applicable Delphix Engine Versions 

  • 3.2.x
  • 4.0.x
  • 4.1.x
  • 4.2.x
  • 4.3.x
  • 5.0.x
  • 5.1.x

Issue

Customer needs to get an easily understandable listing of the VDB snapshots. Including which snapshots are being held due to retention or due to VDB dependencies.

Customer Accessible Data

Listing Snapshots

Snapshots can be listed per database by the customer via the CLI

mwbuild.dc1 snapshot> /snapshot ; list database='Vmar_087'
NAME                         CONTAINER  LATESTCHANGEPOINT.LOCATION  LATESTCHANGEPOINT.TIMESTAMP
'@2016-12-20T08:48:25.301Z'  Vmar_087   6614975                     2016-12-20T08:48:25.000Z
'@2016-12-29T03:36:00.133Z'  Vmar_087   7122728                     2016-12-29T03:36:00.000Z

 

Finding VDB parent snapshots

To locate the parent snapshot for a VDB the timeflow needs to be examined. The parent snapshot cannot be deleted even after it is past its retention period, as the child VDB is dependent on it. Unfortunately this process is slow and laborious, without really providing acceptable results. However without scripting or direct access to MDS, this is about the best we can manage.

List the timeflows for each VDB. Each timeflow will need to be examined, as each timeflow will have a parent snapshot.

mwbuild.dc1 snapshot> /timeflow ; list database='Vmar_087'
NAME                                CONTAINER  PARENTPOINT.TIMEFLOW  PARENTPOINT.LOCATION  PARENTPOINT.TIMESTAMP
'DB_PROVISION@2016-12-20T00:46:42'  Vmar_087   marina/default        6514654               -

 

Select each timeflow and examine its parent snapshot

 

mwbuild.dc1 timeflow> select 'DB_PROVISION@2016-12-20T00:46:42'
mwbuild.dc1 timeflow ''DB_PROVISION@2016-12-20T00:46:42''> ls parentSnapshot
Properties
    type: OracleTimeflow
    name: 'DB_PROVISION@2016-12-20T00:46:42'
    container: Vmar_087
    creationType: INITIAL
    incarnationID: 931049282
    parentPoint:
        type: OracleTimeflowPoint
        location: 6514654
        timeflow: marina/default
    parentSnapshot: '@2016-12-14T03:05:20.416Z' <--- Field we need
    reference: ORACLE_TIMEFLOW-19
    warehouse: false

We can now examine the parental snapshot

 

mwbuild.dc1 timeflow ''DB_PROVISION@2016-12-20T00:46:42''> /snapshot ; select '@2016-12-14T03:05:20.416Z'
mwbuild.dc1 snapshot ''@2016-12-14T03:05:20.416Z''> ;s
Unknown command 's'.
mwbuild.dc1 snapshot ''@2016-12-14T03:05:20.416Z''> ls
Properties
    type: OracleSnapshot
    name: '@2016-12-14T03:05:20.416Z'
    consistency: INCONSISTENT
    container: marina
    creationTime: 2016-12-14T03:05:20.416Z
    firstChangePoint:
        type: OracleTimeflowPoint
        location: 6514594
        timeflow: marina/default
        timestamp: 2016-12-14T03:05:14.000Z
    fromPhysicalStandbyVdb: false
    latestChangePoint:
        type: OracleTimeflowPoint
        location: 6514654
        timeflow: marina/default
        timestamp: 2016-12-14T03:05:14.000Z
    missingNonLoggedData: false
    redoLogSizeInBytes: 52428800
    reference: ORACLE_SNAPSHOT-16
    retention: 0
    runtime:
        type: OracleSnapshotRuntime
        provisionable: true
    temporary: false
    timeflow: marina/default
    timezone: America/Los_Angeles,PST-0800
    version: 12.1.0.2.0

 

Conditional content (Pro member)