Transact-SQL Reference
sp_update_category
Changes the name of a category.
Syntax
sp_update_category [@class =] 'class',
[@name =] 'old_name',
[@new_name =] 'new_name'
Arguments
[@class =] 'class'
Is the class of the category to update. class is varchar(8), with no default, and can be one of these values.
Value | Description |
---|---|
ALERT | Updates an alert category. |
JOB | Updates a job category. |
OPERATOR | Updates an operator category. |
[@name =] 'old_name'
Is the current name of the category. old_name is sysname, with no default.
[@new_name =] 'new_name'
Is the new name for the category. new_name is sysname, with no default.
Return Code Values
0 (success) or 1 (failure)
Remarks
sp_update_category must be run from the msdb database.
Permissions
Only members of the sysadmin fixed server role or db_owner fixed database role can execute sp_update_category.
Examples
This example renames a job category from Table Archixes to Table Archives.
USE msdb
EXEC sp_update_category 'JOB', 'Table Archixes', 'Table Archives'