I was trying to revert a database to a database snapshot using below TSQL and got below error. After reading MS docs I came to know that , we need to drop any other database snapshots before restoring.
use master
RESTORE DATABASE test from
DATABASE_SNAPSHOT = ‘test_snapshot5 ‘
GO

————————-$$$$$$$$$$$$$$$$$$——————————-
TSQL to create snapshot:
--use master
CREATE DATABASE test_snapshot6 ON( NAME = test, FILENAME ='C:\Users\xxxxxy\Desktop\delete\test_snapshot6.ss' )
AS SNAPSHOT OF test
GO
some more facts about Snapshots : Reasons to why we can’t use snapshots instead of native SQL backups.
- Database snapshot on the system databases are not allowed.
- can’t create database snapshot on different server. it should remain on the same server instance as the source database
- if the database is offline or corrupted, we can’t access Snapshots. will get error like below one
