You create a database snapshot using the CREATE DATABASE command.
The syntax for this command is as follows:
CREATE DATABASE database_snapshot_name
ON
(
NAME = logical_file_name,
FILENAME = 'os_file_name'
) [ ,...n ]
AS SNAPSHOT OF source_database_name
In this recipe’s example, a snapshot is generated for the AdventureWorks database:
CREATE DATABASE AdventureWorks_Snapshot_Oct_08_2005
ON
( NAME = AdventureWorks_Data,
FILENAME =
'C:\Apress\Recipes\AdventureWorks_Snapshot_Oct_08_2005.mdf
')
AS SNAPSHOT OF AdventureWorks
GO