Find latest SCN when Rolling Forward a VDB

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

Once database rewind we lose all the snapshots in GUI. Following document shows how to roll forward using CLI.

On step 7 you need to enter SCN number. After you rewind the vDB you dont have access to snapshots on GUI which shows you SCN of those snapshots. Is there a way after rewinding database to find the latest SCN of old timeflow?

Photo of Imran


  • 240 Points 100 badge 2x thumb

Posted 4 years ago

  • 0
  • 1
Photo of Mike Stewart

Mike Stewart, Employee

  • 200 Points 100 badge 2x thumb
Official Response
Hi Syed,

The snapshots from the previous timeflow are visible from the CLI. You could list them in the CLI then pick the scn of the snapshot you wanted to roll foward to.

You can find the last provisionable point of a timeflow in the CLI by selecting the timeflow and then executing the "timeflowRanges" command. The end point of the last provisionable range can then be used in your roll forward work flow. For example:

... timeflow> select 'DB_PROVISION@2015-08-06T09:34:55'
... timeflow ''DB_PROVISION@2015-08-06T09:34:55''> timeflowRanges ... timeflow ''DB_PROVISION@2015-08-06T09:34:55'' timeflowRanges *> commit
        type: TimeflowRange
            type: OracleTimeflowPoint
            location: 2813941
            timeflow: 'DB_PROVISION@2015-08-06T09:34:55'
            timestamp: 2015-08-06T16:37:32.000Z
        provisionable: true
            type: OracleTimeflowPoint
            location: 2813891
            timeflow: 'DB_PROVISION@2015-08-06T09:34:55'
Note that the last provisionable point in the timeflow is not necessarily the same as the exact state of the VDB when the previous rewind occurred. The provisionable point depends on the redo logs that had been archived at that time.

If you want to roll the VDB back to the same state it was at the point of the rewind you can do a database "switchtimeflow" command to the timeflow that was current when the rewind command executed. For example:

... database> select Vdbd_B2D
... database 'Vdbd_B2D'> switchTimeflow
... database 'Vdbd_B2D' switchTimeflow *> ls
    type: SwitchTimeflowParameters
    timeflow: (required)
... database 'Vdbd_B2D' switchTimeflow *> set timeflow='DB_PROVISION@2015-08-06T9:34:55'
... database 'Vdbd_B2D' switchTimeflow *> commit

I hope this helps.