Udostępnij za pośrednictwem


Readme_Snapshot

The purpose of the DatabaseSnapshot sample is to demonstrate the database snapshot capabilities of Microsoft SQL Server 2005. For information about this new feature, refer to the topic, "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 AdventureWorks sample database.

Languages

Transact-SQL

Prerequisites

Before running either of the scripts included in this sample, make sure the following software is installed:

  • SQL Server 2005, including the following components:
    • Database Engine
    • SQL Server Management Studio
    • AdventureWorks (OLTP) sample database
    • SQL Server Engine samples

Running the Sample

Installing and Running the Sample

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