Export (0) Print
Expand All
Expand Minimize

sp_delete_category

SQL Server 2000

Removes the specified category of jobs, alerts, or operators from the current server.

Syntax

sp_delete_category [ @class = ] 'class' ,
    
[ @name = ] 'name'

Arguments

[@class =] 'class'

Is the class of the category. class is varchar(8), with no default, and must have one of these values.

Value Description
JOB Deletes a job category.
ALERT Deletes an alert category.
OPERATOR Deletes an operator category.

[@name =] 'name'

Is the name of the category to be removed. name is sysname, with no default.

Return Code Values

0 (success) or 1 (failure)

Result Sets

None

Remarks

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.

Permissions

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.

Examples

This example deletes the job category named AdminJobs.

USE msdb
EXEC sp_delete_category 'JOB', 'AdminJobs'

See Also

sp_add_category

sp_help_category

sp_update_category

System Stored Procedures

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft