Restoring a database to a point-in-time
In this recipe, we will use the different backup files which we have to restore to a point-in-time.
Getting ready
In this recipe, we will use the SampleDB
database. The SampleDB
database has a single filegroup that contains a single data file. We will restore this database to another SQL Server instance, and to a point-in-time using three different backup files from three different backup types:
Full backup
Differential backup
Transaction log backup
You can use the following script to create your files in B04525 - Ch05 - 10 - Restoring a Database to a Point in Time – Prep.ps1
(this is available in the code bundle available with the book), which is included in the downloadable files for this book. The prep file will perform the following tasks:
Create a sample database called
SampleDB
.Create a table called
Record
insideSampleDB
, which will contain a date/time column that will capture when records are inserted. This column will help verify that our point-in...