Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase

Create Snapshot Dynamicly Expand / Collapse
Posted Saturday, June 21, 2008 9:16 PM

Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Sunday, January 29, 2012 1:45 AM
Points: 710, Visits: 1,284
Comments posted to this topic are about the item Create Snapshot Dynamicly


Post #521364
Posted Thursday, October 22, 2009 4:42 PM


Group: General Forum Members
Last Login: Tuesday, October 21, 2014 12:22 PM
Points: 16, Visits: 81
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 AS orignal_database_name, AS snapshot_name
sys.databases AS a
sys.databases AS b ON a.source_database_id = b.database_id
ISNULL(a.source_database_id, 00000) <> 00000

Always review any code you download!
Post #807504
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse