Scripts for SQL Server Snapshots

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

Just for the sake of simplicity, I’m posting all three required scripts which create, drop and restore SQL Server Snapshot Databases.

-- Create snapshot

CREATE DATABASE TestDb_Snap1 ON( NAME = TestDb, FILENAME = 'C:\Temp\\TestDbSnap.ss' )

AS SNAPSHOT OF TestDb;

GO

 

-- Drop Snapshot

DROP DATABASE TestDb_Snap1

 

-- Restore Snapshot

RESTORE DATABASE TestDb from

DATABASE_SNAPSHOT = 'TestDb_Snap1'


Posted Apr 01 2009, 02:51 PM by Damir Dobric
developers.de is a .Net Community Blog powered by daenet GmbH.