O'Reilly logo

SQL Server 2012 with PowerShell V3 Cookbook by Donabel Santos

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

Performing an online piecemeal restore

In this recipe, we will perform an online piecemeal restore.

Getting ready

We will use a test database called StudentDB database, which has three filegroups—one primary, two custom filegroups FG1 and FG2—in this recipe. Each of FG1 and FG2 will have one secondary datafile stored in the C:\Temp folder.

You can use the script 6464 - Ch05 - 11 - Perform an Online PieceMeal Restore - Prep.ps1 to create your files, which is included in the downloadable files for this book. When the script has finished executing, you should see the following database:

Getting ready

This is how the tables will be structured:

Table

Filegroup

Datafile ...

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