New answers tagged

2

There is another way in which snapshots can be used to recover lost data, specifically when used with AlwaysOn Availability Groups. If there would be a need to have a forced failover, a snapshot can be created of the database(s) that were previously the primary before resuming data movement. This would give you a before and after picture (snapshot is ...


3

But my problem is how can database snapshot to be used to recover data? You have two options here. You can revert your existing database back to the point of the snapshot using this command: RESTORE DATABASE DatabaseName FROM DATABASE_SNAPSHOT = SnapshotName However that will overwrite your existing database. If you think you might need to keep ...


4

how can database snapshot to be used to recover data? Yes, you have to use restore database ... FROM DATABASE_SNAPSHOT. It is called reverting the database to a database snapshot. You would use it to reverse a serious error e.g. drop table, deleting data, etc. This is important : all changes made after the snapshot was created are lost. . ...


2

Their cannot be a comparison drawn as Snapshot is "photo copy" of data file. The difference lies in amount of activity both does and consistency of product arising out of both the operations. Full backup "Is Always" more reliable than snapshot backup Full backup includes all committed and uncommitted transaction when full backup has finished. Read more ...


4

Mostly because a snapshot isn't really a backup. As explained in How database snapshots work The snapshot uses one or more sparse files. Initially, a sparse file is an essentially empty file that contains no user data and has not yet been allocated disk space for user data. As more and more pages are updated in the source database, the size of ...


-1

Found this question when trying to do the same and ended up using git on the postgresql data directory. Discarding the changes is as easy as: git reset --hard


6

You can identify database snapshots in sys.databases by the column source_database_id being not null. Join it to sys.master_files and you're done: SELECT mf.database_id, dbs.source_database_id, mf.type_desc, mf.name, mf.physical_name FROM sys.master_files AS mf INNER JOIN sys.databases AS dbs ON mf.database_id = dbs.database_id WHERE ...



Top 50 recent answers are included