Removes the specified category of jobs, alerts, or operators from the current server.
sp_delete_category [@class =] 'class',
[@name =] 'name'
Value | Description |
---|---|
JOB | Deletes a job category. |
ALERT | Deletes an alert category. |
OPERATOR | Deletes an operator category. |
0 (success) or 1 (failure)
None
sp_delete_category must be executed in the msdb database.
Deleting a category recategorizes any jobs, alerts, or operators in that category to the default category for the class.
Only members of the sysadmin fixed server role or the db_owner fixed database role can execute, or grant permissions to execute, sp_delete_category in the current database.
This example deletes the job category named AdminJobs.
USE msdb
EXEC sp_delete_category 'JOB', 'AdminJobs'
sp_add_category | sp_update_category |
sp_help_category | System Stored Procedures |