Restore a SQL Server Database to a Point in Time - SQL Server DBA Tutorial

In this video you will learn how to restore SQL Server database to Point in time using Full, Differential and T-Log backups using SQL Server management studio as well as T-SQL Script. It goes through a scenario to recover database to a specific time, step by step restoring SQL Server database to point in time.

Scripts used in video to Point in Time Restore of a SQL Server Database
USE [master] 
BACKUP LOG [SalesOrders] TO  DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLPROD\MSSQL\Backup\SalesOrders_LogBackup_2015-03-03_18-52-18.bak' WITH NOFORMAT, NOINIT,  
 NAME = N'SalesOrders_LogBackup_2015-03-03_18-52-18', 
 NOSKIP, NOREWIND, NOUNLOAD,
  
NORECOVERY ,  STATS = 5


 RESTORE DATABASE [SalesOrders] FROM  DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLPROD\MSSQL\Backup\Fullbackup603.bak'  
WITH  FILE = 1, NORECOVERY,  NOUNLOAD,  STATS = 5 

RESTORE DATABASE [SalesOrders] FROM  DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLPROD\MSSQL\Backup\Diff605.bak' 
WITH  FILE = 1,
  
NORECOVERY,  NOUNLOAD,  STATS = 5 


RESTORE LOG [SalesOrders] FROM  DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLPROD\MSSQL\Backup\Tran606.trn' 
WITH  FILE = 1,  NOUNLOAD,  STATS = 5
GO




Restore a SQL Server Database to a Point in Time - SQL Server DBA Tutorial

2 comments:

  1. For example, if you start trying to manifest a new car, you may eventually realize that the thing you really want is freedom—not some vehicle. If you believe in the value of subconscious thought, this can be invaluable. https://tutuappx.com/

    ReplyDelete
  2. Keeping your eyes on the thing you want most may improve your ability to work towards your goal. Vidmate

    ReplyDelete