Adds the specified category of jobs, alerts, or operators to the server.
sp_add_category [[@class =] 'class',]
[[@type =] 'type',]
{[@name =] 'name'}
| Value | Description |
|---|---|
| JOB | Adds a job category. |
| ALERT | Adds an alert category. |
| OPERATOR | Adds an operator category. |
| Value | Description |
|---|---|
| LOCAL | A local job category. |
| MULTI -SERVER | A multiserver job category. |
| NONE | A category for a class other than JOB. |
0 (success) or 1 (failure)
None
sp_add_category must be executed in the msdb database.
Only members of the sysadmin fixed server role or the db_owner fixed database role can execute sp_add_category.
This example creates a local job category name AdminJobs.
USE msdb
EXEC sp_add_category 'JOB', 'LOCAL', 'AdminJobs'
| sp_delete_category | sysjobs |
| sp_help_category | sysjobservers |
| sp_update_category | System Stored Procedures |