In this recipe, we will perform an online piecemeal restore.
We will back up a test database called StudentDB
database, which has three filegroups: one primary filegroup and two custom filegroups, FG1
and FG2
, in this recipe. FG1
and FG2
will have one secondary data file stored in the C:\DATA
folder.
You can use the following script to create your files B04525 - Ch05 - 11 - Performing an Online PieceMeal Restore - Prep.ps1
(this is available in the code bundle available with the book), which is included in the downloadable files for this book. After the script is executed, you should see the following database:
This is how the tables will be structured:
Table |
Filegroup |
Data file name |
Data file location |
---|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|