Export (0) Print
Expand All
Expand Minimize

sp_update_category (Transact-SQL)

Changes the name of a category.

Topic link icon Transact-SQL Syntax Conventions


sp_update_category
     [@class =] 'class' , 
     [@name =] 'old_name' ,
     [@new_name =] 'new_name'

[ @class =] 'class'

The class of the category to update. classis 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'

The current name of the category. old_nameis sysname, with no default.

[ @new_name =] 'new_name'

The new name for the category. new_nameis sysname, with no default.

0 (success) or 1 (failure)

sp_update_category must be run from the msdb database.

To run this stored procedure, users must be granted the sysadmin fixed server role.

The following example renames a job category from AdminJobs to Administrative Jobs.

USE msdb ;
GO

EXEC dbo.sp_update_category
  @class = N'JOB',
  @name = N'AdminJobs',
  @new_name = N'Administrative Jobs' ;
GO
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft