Skip to main content
Skip table of contents

CLI cookbook: rolling forward a VDB

This topic describes how to roll forward a virtual database after it has been rewound, as described in Provisioning and Managing Virtual Databases.

Once a VDB has rewound to a specific TimeFlow point, the snapshots of its previous states are still available in Delphix Engine storage and are accessed via the command-line interface to restore those previous states. This is referred to as "rolling forward" a VDB.

Procedure

  1. Use the ls command to find the VDB you want to roll forward. In this example, the TimeFlows and their associated containers are listed. The VDB called PVDBwill be the one to roll forward.

    ACTIONSCRIPT3
    delphix timeflow> ls
    Objects
    NAME                                CONTAINER  PARENTPOINT.TIMEFLOW                PARENTPOINT.LOCATION  PARENTPOINT.TIMESTAMP
    hrprod/default                      hrprod     -                                   -                     -
    erpprod/default                     erpprod    -                                   -                     -
    'DB_PROVISION@2013-11-25T17:37:06'  PVDB       erpprod/default                     657925                -
    'DB_ROLLBACK@2013-11-25T18:24:16'   PVDB       'DB_PROVISION@2013-11-25T17:37:06'  678552
  2. Use the Selectcommand to select the database.

    ACTIONSCRIPT3
    delphix database> select PVDB
  3. Use the rollbackcommand to roll forward the VDB.

    ACTIONSCRIPT3
    delphix database "PVDB"> rollback
  4. Use the ls command to display options for selecting TimeFlow parameters.

    CODE
    delphix database "PVDB" rollback *> ls
    Properties  
        type: OracleRollbackParameters    
        credential: (unset)    
        timeflowPointParameters:    
            type: TimeflowPointSemantic        
            container: (required)        
            location: LATEST_POINT    
        username: (unset)
  5. Because this VDB was rolled back, two TimeFlows now exist for it. To rollback the VDB and roll it forward, select the original TimeFlow, because the original snapshots are associated with that TimeFlow.

    ACTIONSCRIPT3
    delphix database "PVDB" rollback *> set timeflowPointParameters.type=TimeflowPointLocation
    delphix database "PVDB" rollback *> set timeflowPointParameters.timeflow='DB_PROVISION@2013-11-25T17:37:06'
  6. Use the ls command to view the parameter options for the TimeFlow you selected.

    CODE
    delphix database "PVDB" rollback *> ls
    Properties 
        type: OracleRollbackParameters    
        credential: (unset)    
        timeflowPointParameters:    
            type: TimeflowPointLocation (*)        
            location: LATEST_POINT        
            timeflow: 'DB_PROVISION@2013-11-25T17:37:06' (*)    
        username: (unset)
  7. Set the TimeFlow location to rollback the VDB to a particular Oracle SCN.

    CODE
    delphix database "PVDB" rollback *> set timeflowPointParameters.location=678994
  8. Use the ls command to review all the options you selected before executing the commit. 

    CODE
    delphix database "PVDB" rollback *> ls 
    Properties 
        type: OracleRollbackParameters    
        credential: (unset)    
        timeflowPointParameters:        
            type: TimeflowPointLocation (*)        
            location: 678994 (*)        
            timeflow: 'DB_PROVISION@2013-11-25T17:37:06' (*)    
        username: (unset)
  9. Commit the changes.

    ACTIONSCRIPT3
    delphix database "PVDB" rollback *> commit
        Dispatched job JOB-369    
        DB_ROLLBACK job started for "ERP/PVDB".    
        Starting provision of the virtual database "PVDB".    
        Creating new TimeFlow.    
        Generating recovery scripts.    
        Exporting storage.    
        Validating user environment settings on target host.    
        Mounting filesystems for the virtual database instance "1".    
        Mounting read-only archive log filesystem for the virtual database instance "1".    
        Running user-specified pre-provisioning script.    
        Recovering Oracle database.    
        Opening the virtual database "PVDB".    
        Opening Oracle database.    
        Oracle recovery was successful.    
        Unmounting read-only archive log filesystem for the virtual database instance "1".    
        Running user-specified post-provisioning script.    
        The virtual database "PVDB" was successfully provisioned.    
        Starting snapshot of virtual database.    
        Processing database files of virtual database.    
        Creating snapshot of virtual database.    
        Finalizing snapshot of virtual database.    
        Virtual database "PVDB" snapshot successful.    
        DB_ROLLBACK job for "ERP/PVDB" completed successfully.
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.