Readme_Snapshot Sample

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

This sample works only with SQL Server 2005 and SQL Server 2008. It will not work with any version of SQL Server earlier than SQL Server 2005.

The purpose of the DatabaseSnapshot sample is to demonstrate the database snapshot capabilities of SQL Server. For more information, see "Database Snapshots" in SQL Server Books Online.

Scenario

A database snapshot is a read-only, static view of a database. This database is called the source database. Each database snapshot is transaction-consistent with the source database at the moment of the snapshot's creation. A snapshot persists until it is explicitly dropped by the database owner. Multiple snapshots can exist on a database. This sample creates a new database snapshot of the AdventureWorks2008R2 sample database.

Languages

Transact-SQL

Prerequisites

Before you run this sample, perform the following tasks:

  • Install SQL Server and make sure you include the following components:
    • The Database Engine
    • SQL Server Management Studio
  • Download the AdventureWorks2008R2 (OLTP) sample database and SQL Server Database Engine samples available at the Microsoft SQL Server Samples and Community Projects Web site.

Running the Sample

Installing and Running the Sample

  1. From Management Studio, open the file CreateDatabaseSnapshot.sql script located in the C:\Program Files\Microsoft SQL Server\100\Samples\Engine\Administration\DatabaseSnapshot\Scripts folder, and click Execute.