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:
This is how the tables will be structured:
Table |
Filegroup |
Datafile name |
Datafile location |
---|---|---|---|
|
|
|
Default data directory |
|
|
|
|
|
|
|
|
|
|
|
Default data directory |
For our recipe, we will restore only the PRIMARY
filegroup, and filegroup FG2...