Error Reverting a Database to a Database Snapshot.
Applies to: Microsoft SQL Server 2005, Microsoft SQL Server 2008.
Error Message.
The following error occurs when reverting a database to a database snapshot:
(local)(\amorillo): Msg 5070, Level 16, State 2, Line 4
Database state cannot be changed while other users are using the database
'AWDB_Snapshot_20080522'
(local)(\amorillo): Msg 3013, Level 16, State 1, Line 4
RESTORE DATABASE is terminating abnormally.
Cause.
There are active processes accessing the database snapshot that is being used in
the revert operation.
Solution.
Drop any process accessing the database snapshot using Activity Monitor.
To open Activity Monitor in Microsoft SQL Server 2005, see the steps below:
1) In SQL Server Management Studio, connect to the server using Object Explorer
2) Expand Management
3) Double-click Activity Monitor.
To open Activity Monitor in Microsoft SQL Server 2008 RC 0, see the steps below:
1) In SQL Server Management Studio, connect to the server using Object Explorer
2) Make a right click on the server you are connected
3) Select "Activity Monitor"
Once you have opened Activity Monitor, drop any process displayed that is
accessing the database snapshot, making a right click on the process and choosing "Kill Process".
Once you have dropped any process accessing the database snapshot, try to do
the revert operation again.