Creating a database snapshot

In this recipe, we will create a database snapshot.

Getting ready

SQL Server database snapshots require either the SQL Server Developer or Enterprise edition. You can also use the Evaluation edition, which is similar to the Enterprise edition.

We will use the script called B04525 - Ch06 - 04 - Creating a Database Snapshot - Prep.ps1 to create a sample database that we will base our snapshot on. The database created in this script will have multiple Filegroups and data files.

Alternatively, you can choose a source database that you would like to serve as the base of your snapshot.

How to do it...

Let's take a look at the steps to create a database snapshot:

  1. Open PowerShell ISE as an administrator.
  2. Import the SQLPS module and ...

Get SQL Server 2014 with PowerShell v5 Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.