Creating a Database Snapshot

One of the first things you must figure out before you create a database snapshot is whether your source database data portion has more than one physical file in its allocation. All these file references must be accounted for in the snapshot. You execute the system stored procedure sp_helpdb with the source database name as the parameter, as shown here:

EXEC SP_HELPDB AdventureWorks Go

The detailed file allocations of this database are as follows:

image

You need to worry about only the data portion of the database for the snapshot:

Creating the database snapshot is really that easy. Now let’s walk through a simple example ...

Get Microsoft® SQL Server 2008 R2 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.