Diff Backup Restore

--Make sure the database is using the simple recovery model.
ALTER DATABASE ten SET RECOVERY SIMPLE;
GO

-- Back up the full AdventureWorks2008R2 database.
BACKUP DATABASE AdventureWorks2008R2 TO DISK = 'D:\Websites\DB Backup\Ten\AdventureWorks2008R2.bak'
WITH FORMAT;
GO

--Create a differential database backup.
BACKUP DATABASE AdventureWorks2008R2 TO DISK = 'D:\Websites\DB Backup\Ten\AdventureWorks2008R2.bak'
   WITH DIFFERENTIAL;
GO

--Restore the full database backup (from backup set 1).
RESTORE DATABASE TEN FROM DISK = 'D:\Websites\DB Backup\Tenx\65838_Ten_25APR2013_23_04_54_FULL.bak'
   WITH FILE=1, NORECOVERY;

--Restore the differential backup (from backup set 2).
RESTORE DATABASE TEN FROM DISK = 'D:\Websites\DB Backup\Tenx\65926_Ten_26APR2013_10_42_13_DIFF.bak'
   WITH FILE=1, RECOVERY;
GO
 

Comments

Popular posts from this blog

Who Deleted and Drop the record in table

Generate Password

Key Board Shortcuts