![]() SET = N'Error During Differential Backup of Database ' + xp_logevent 50001, warning This is the differential backup script: - SQL SERVER USER'S DATABASE BACKUP WITH ODD/EVEN WEEK ROTATION RAISERROR('Full Backup threw an exception', 20, 1) WITH LOG If any errors are encountered, exit step with an error. SET = N'Error During Full Backup of Database ' + xp_logevent 50001, warning įETCH NEXT FROM db_cursor INTO db_cursor Can't backup database, log error to eventviewer Encapsulate the backup block in a try/catch statement, so a single failed backup WHERE name NOT IN (**'master','model','msdb','tempdb','ReportServerTempDB'**) IF = 0 SET ELSE SET Exclude system databases from backup SET = '\\YOURSERVER\YOURSHARE\YOURFOLDER\' Full backup script - SQL SERVER USER'S DATABASE BACKUP WITH ODD/EVEN WEEK ROTATION ![]() Next, you must create the target folders.Īssuming that backups will be stored under UNC path \\YOURSERVER\YOURSHARE\YOURFOLDER\, you'll have to create SET-ODD and SET-EVEN folders on that path prior to making the backups, since the scripts don't include logic for interacting with the file system. WHERE name NOT IN ('master','model','msdb','tempdb','ReportServerTempDB') Open a cursor and change the list of excluded databases as needed. ![]() Then adjust the databases excluded from backup: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |