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.

Manage transaction log backups

Manage transaction log backups - SQL Server Tutorial

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

Start my 1-month free trial

Manage transaction log backups

- [Instructor] With our recovery model set to full, the transaction log will be maintained by SQL server and can be used to perform point-in-time restores. In order to do this though, we need to have a recent backup of the transaction log in addition to the data file. We can explore this by creating a new database called transaction log db and then switching into it. Because the recovery model of your server instance's model database might be different than mine, let's just go ahead and check to see where we're at. I'm going to write a select statement against a system view called sys.databases. In the results we can see the recovery model for the transaction log database, and mine is currently set to full. If yours is set to something else, go ahead and run line 14 to alter the database and set its recovery mode to full. Once we're set with that, we can go ahead and add in a table with some data. I'm going to create a new schema called warehouse, we'll add a table into that schema…

Contents