Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I never had to drop a snapshot with SQL Server 2008, but now when I try to restore in SQL Server 2012, I get the error:

System.Data.SqlClient.SqlError: The operation cannot be performed on a database with database snapshots or active DBCC replicas.

Why is this necessary in 2012 and not in 2008?

share|improve this question

migrated from Jan 16 '13 at 15:47

This question came from our site for professional and enthusiast programmers.

Actually, you did have to drop the snapshot before the restore. Here's the Books Online post about it:

In particular, "The database cannot be dropped, detached, or restored."

You might have been using a restore script or tool that automatically dropped the snapshots for you. (My own restore database script does that - checks for snapshots first and deletes 'em.)

share|improve this answer
+1 also, if you restore over a different version of the database that has a snapshot, what on earth would the snapshot be good for? It would be completely unusable. Now, it would be nice if RESTORE had an intuitive option, like WITH DROP_EXISTING_SNAPSHOTS :-) – Aaron Bertrand Jan 16 '13 at 16:33
You had better have upvoted that answer and not just written +1, hahahaha.... – Brent Ozar Jan 16 '13 at 20:27
are you kidding? That's my m.o. Make people think I like what they wrote. Secretly I am planning their demise. Oh crap, is this real life? – Aaron Bertrand Jan 16 '13 at 20:30
Now that I think of it, you are correct, just wasn't used to seeing that error. But, when restoring in 2012, I got the error to go away when I unchecked something about tail log backup (not sure if this is what it was called) under options. – Xaisoft Jan 17 '13 at 5:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.