O'Reilly logo

Microsoft SQL Server 2014 Unleashed by Paul Bertucci, Alex T. Silverstein, Chris Gallelli, Ray Rankins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 of the data file references must be accounted for in the snapshot. To get a list of all of the data files for a database, you can run the following query within the source database:

use AdventureWorks2012goselect name, physical_name from sys.database_fileswhere type_desc = 'ROWS'go

The data file allocations for this database returned by this query are as follows:

name                     physical_name------------------------ ------------------------------------------AdventureWorks2012_Data  C:\MSSQL\Data\AdventureWorks2012_Data.mdf ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required