SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Create Snapshot Dynamicly


Create Snapshot Dynamicly

Author
Message
mobasha
mobasha
SSCommitted
SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)SSCommitted (1.5K reputation)

Group: General Forum Members
Points: 1516 Visits: 1284
Comments posted to this topic are about the item Create Snapshot Dynamicly

..>>..

MobashA
psteffek-663021
psteffek-663021
Grasshopper
Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)Grasshopper (16 reputation)

Group: General Forum Members
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
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!
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search