Scripts used in this video:
BACKUP DATABASE [SalesOrders] TO DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLPROD\MSSQL\Backup\SalesOrders.bak'WITH RETAINDAYS = 10, NOFORMAT, NOINIT, NAME = N'SalesOrders-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10, CHECKSUM
GO/*declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N'SalesOrders'
and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'SalesOrders' )
if @backupSetId is null begin raiserror(N'Verify failed. Backup information for database ''SalesOrders'' not found.', 16, 1) end
RESTORE VERIFYONLY FROM DISK = N'C:\Program Files\Microsoft SQL Server\MSSQL12.SQLPROD\MSSQL\Backup\SalesOrders.bak'
WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO */
How to Manually Take Full Backup of SQL Server Database
No comments:
Post a Comment