From the course: SQL Server 2016: Administer a Database Infrastructure

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Automate and test restores

Automate and test restores - SQL Server Tutorial

From the course: SQL Server 2016: Administer a Database Infrastructure

Start my 1-month free trial

Automate and test restores

- [Instructor] When a production database is live, you probably want to avoid working in it as you develop new features and enhance procedures. You'll most likely create a duplicate testing server that will act as your develop playground. However, it would be nice to have a regular update with live data so that your development or test server work mirrors the production server as closely as possible. We can do that by creating a backup of the production database and restoring it to a testing database. As a bonus, the process can be automated using the SQL server agent. Let's dig in to how this will work. First, we'll create a new database called production DB. Then just to make sure, we'll set its recovery mode to full. Next we're going to populate it with a table and some records. We'll create a schema called warehouse, we'll create a table called warehouse.newproducts and we'll add in some products. Now that we have a table with three product lines, let's go ahead and create a…

Contents