sp_delete_category [ @class = ] 'class' , [ @name = ] 'name'
- [ @class =] 'class'
The class of the category. class is varchar(8), with no default, and must have one of these values.
Deletes a job category.
Deletes an alert category.
Deletes an operator category.
- [ @name =] 'name'
The name of the category to be removed. name is sysname, with no default.
0 (success) or 1 (failure)
sp_delete_category must be run from 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 can run this procedure.
The following example deletes the job category named AdminJobs.
USE msdb ;
@name = N'AdminJobs',
@class = N'JOB' ;