Export (0) Print
Expand All
Expand Minimize

sp_update_category (Transact-SQL)

Applies To: SQL Server 2014, SQL Server 2016 Preview

Topic Status: Some information in this topic is preview and subject to change in future releases. Preview information describes new features or changes to existing features in Microsoft SQL Server 2016 Community Technology Preview 2 (CTP2).

Changes the name of a category.

Applies to: SQL Server (SQL Server 2008 through current version).

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:
© 2015 Microsoft