|
|
|
Say Hey Kid
      
Group: General Forum Members
Last Login: Sunday, January 29, 2012 1:45 AM
Points: 710,
Visits: 1,284
|
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, February 14, 2013 3:43 PM
Points: 16,
Visits: 68
|
|
BEWARE!I like this script overall, it's exactly what I was looking for but this will drop all snapshots on the instance of SQL Server, not just the ones related to the database you are snapshotting!
Note the lack of a DB name in the where clause for the following:
SELECT b.name AS orignal_database_name, a.name AS snapshot_name FROM sys.databases AS a JOIN sys.databases AS b ON a.source_database_id = b.database_id WHERE ISNULL(a.source_database_id, 00000) <> 00000
Always review any code you download!
|
|
|
|