Revert database from snapshot

  • Will it update the snapshot database, if there are changes in the primary database? If yes, how can I revert the database in point in time.

    - Zahran -

  • A snapshot reflects the state of the database at the time the snapshot was made. Subsequent changes to the source database are not reflected in the snapshot.

    To revert the source database to an earlier point in time using the snapshot, you could do the following:

    - make a backup of the source database (just in case...)

    - make a transaction log backup of the source database

    - drop all snapshots other than the one you're restoring from

    - connect to master, and run something similar to the following (I'm using AdventureWorks in the example):

    RESTORE DATABASE AdventureWorks FROM DATABASE_SNAPSHOT = 'AdventureWorks_snapshot01'

    SQL BAK Explorer - read SQL Server backup file details without SQL Server.
    Supports backup files created with SQL Server 2005 up to SQL Server 2017.

  • Once the snapshot is used to revert the main database, the snapshot is lost.

    To get back to a point in time with the main database different from when the snapshot was made, you will need to restore the main database (full) and then logs to the point in time.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply