Quantcast
Channel: Welcome To TechBrothersIT
Viewing all articles
Browse latest Browse all 1968

How to Restore a Database from Differential Backup in SQL Server - SQL Server DBA Tutorial

$
0
0
In this video you will learn how to restore SQL Server database using differential backup, how to add full backup and differential backup to restore, error concerning restore of differential backup with no full backup, database is not restored to correct earlier state. Tail Log backup options and best practices, restoring Differential database using T-SQL Script.

Scripts used in video for Differential backup and Restore



USE [master] 
BACKUP LOG [SalesOrders] TO  DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLPROD\MSSQL\Backup\SalesOrders_LogBackup_2015-03-03_17-52-03.bak' WITH NOFORMAT, NOINIT
 NAME = N'SalesOrders_LogBackup_2015-03-03_17-52-03', NOSKIP, NOREWIND, 
 NOUNLOAD,  NORECOVERY ,  STATS = 5 

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

GO




How to Restore a Database from Differential Backup in SQL Server

Viewing all articles
Browse latest Browse all 1968

Trending Articles