This SP manages deferments for backup reporting. It can be called manually or by the Setup.DeferMaster SP.
A deferment is a way to snooze an alert condition so that it doesn't show up in the report email. This means that you can defer any number of conditions without having to disable any jobs and remember to turn them back on.
Here are the parameters it accepts:
Parameter Name | Data Type | Definition |
@ServerName | VARCHAR(100) | The name of the server you want to defer. This value comes from the dbo.Servers.ServerName column or the alert email. The reason we chose ServerName instead of InstanceID is because it's more friendly, and therefore easier to remember. *There is no way to defer servers at the global level. To achieve this functionality you have to disable the alert jobs. |
@DBName | VARCHAR(100) | The name of the DB you want to defer. This is the DBName as it appears in the alert email, or in the Collector.DBProperties.DBName column. Acceptable values are: <DBName>, All. See DBName below for discussion. |
@BackupType | VARCHAR(10) | The type of backup you want to defer. Accepted values are: Full, Diff, Log. *There is no way to defer all backup types in a single call. To achieve this functionality you have to run this SP once for each backup type you want to defer. |
@DeferDate | DATE | The date that the deferment was added to the defer table. It doesn't matter what the exact time is because it's really only there for your information. It's not used by the system. |
@DeferEndDate | DATE | This is the date that you want the deferment to end. This is used by the system to determine if an alert item will appear in the email report. It's calculated by comparing this date with the date of the email report execution. |
@DeferEndTime | TIME(7) | This is the time that you want the deferment to end. This is used by the system to determine if an alert item will appear in the email report. It's calculated by comparing this time with the time of the email report execution. Even though it uses TIME(7), the calculation is only accurate to the minute. |
DBName
Of course, you can defer a specific backup type for a specific DB, but what if an entire servers is having issues and it has hundreds or thousands of DBs on it? You wouldn't want to manage that many deferments in the table, so you can specify a ServerName and use 'All' for the DBName. This lets you take care of all the DBs in a single call.
You can't defer DBs based on wildcards or regex.
Defer All DBs for a Server
--This will defer alerts for Full backups on the MinionDevcon server for All DBs. --The deferment starts on 2018-10-03 and ends at 6:00 on 2018-10-05. EXEC Setup.BackupDefer 'MinionDevcon', 'All', 'Full', '2018-10-03 13:21:56.239', '2018-10-05', '06:00:00'
Related Topics