--Initialize the backup file and backup the SmallWorks database to the file
BACKUP DATABASE SmallWorks
TO DISK = 'E:\SQLBackups\SmallWorksBackups.BAK'
WITH INIT, DESCRIPTION = 'Full Backup of SmallWorks'
--Send an Additional backup to the file
BACKUP DATABASE SmallWorks
TO DISK = 'E:\SQLBackups\SmallWorksBackups.BAK'
WITH DIFFERENTIAL, DESCRIPTION = 'Differential Backup of SmallWorks'
--Capture the tail of the log prior to restore operation
BACKUP LOG SmallWorks
TO DISK = 'E:\SQLBackups\SmallWorksBackups.BAK'
WITH NO_TRUNCATE, DESCRIPTION = 'Tail Log Backup of SmallWorks'
--Restore the Full Backup with NORECOVERY
RESTORE DATABASE SmallWorks
FROM DISK = 'E:\SQLBackups\SmallWorksBackups.BAK'
WITH FILE = 1, NORECOVERY
--Restore the Differential Backup with NORECOVERY
RESTORE DATABASE SmallWorks
FROM DISK = 'E:\SQLBackups\SmallWorksBackups.BAK'
WITH FILE = 2, NORECOVERY
--Restore the Tail Log Backup with RECOVERY
RESTORE LOG SmallWorks
FROM DISK = 'E:\SQLBackups\SmallWorksBackups.BAK'
WITH File = 3, RECOVERY