Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.
This code is failing with this error: Msg 137, Level 15, State 2, Line 4
DECLARE @FILENAME AS VARCHAR(255) SELECT @FILENAME = N'D:\SQL Backups\AERT\AERT_Full_' + CAST(GETDATE() AS VARCHAR(20)) + '.bak' BACKUP DATABASE [AERT] TO DISK = @FILENAME WITH NOFORMAT, NOINIT, NAME = N'AERT-Full Database Backup', SKIP, NOREWIND, NOUNLOAD, STATS = 10 GO declare @backupSetId as int select @backupSetId = position from msdb..backupset where database_name=N'AERT' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N'AERT' ) if @backupSetId is null begin raiserror(N'Verify failed. Backup information for database ''AERT'' not found.', 16, 1) end RESTORE VERIFYONLY FROM DISK = @FILENAME WITH FILE = @backupSetId, NOUNLOAD, NOREWIND GO
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|I am writing a Stored Procedure using SQL Server 2008. Do you know how I can resolve the error: Must declare the scalar variable "@sBank" ?||7||39|
|Create a Calendar table||29||43|
|SQL Simple Query Taking a Very Long Time||11||36|
Join the community of 500,000 technology professionals and ask your questions.