Wednesday, April 27, 2005

HOWTO: Restore a differential database backup

ALTER DATABASE DB_Restore_To SET SINGLE_USER
GO

RESTORE DATABASE DB_Restore_To FROM DISK = 'C:\MSSQL\DB_Restore_From_Full.BAK' WITH NORECOVERY
GO

RESTORE DATABASE DB_Restore_To FROM DISK = 'C:\MSSQL\DB_Restore_From_Diff.BAK' WITH NORECOVERY
GO

RESTORE LOG DB_Restore_To FROM DISK = 'C:\MSSQL\DB_Restore_From_Tran.TRN'
GO

ALTER DATABASE DB_Restore_To SET MULTI_USER
GO

No comments: