SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
Search:  
 
 
        
Home       Members    Calendar    Who's On



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


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Tuesday, November 10, 2009 10:35 AM
Points: 710, Visits: 1,269
Comments posted to this topic are about the item Create Snapshot Dynamicly

..>>..

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

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Yesterday @ 12:05 PM
Points: 1, Visits: 20
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!
Post #807504
« Prev Topic | Next Topic »


Permissions Expand / Collapse