IF EXISTS (SELECT * FROM sys.databases WHERE NAME='DATABASE_SS') BEGIN DROP DATABASE DATABASE_SS; END GO CREATE DATABASE DATABASE_SS ON (NAME = DATABASE, FILENAME = 'D:\SQLData_SS\DATABASE.SS') AS SNAPSHOT OF DATABSE GO