Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Applies to:
SQL Server
Removes the specified category of jobs, alerts, or operators from the current server.
Transact-SQL syntax conventions
sp_delete_category
[ @class = ] 'class'
, [ @name = ] N'name'
[ ; ]
The class of the category. @class is varchar(8), with no default, and must be one of these values.
Value | Description |
---|---|
JOB |
Deletes a job category. |
ALERT |
Deletes an alert category. |
OPERATOR |
Deletes an operator category. |
The name of the category to be removed. @name is sysname, with no default.
0
(success) or 1
(failure).
None.
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.
You can grant EXECUTE
permissions on this procedure, but these permissions might be overridden during a SQL Server upgrade.
The following example deletes the job category named AdminJobs
.
USE msdb;
GO
EXEC dbo.sp_delete_category
@name = N'AdminJobs',
@class = N'JOB';
GO
Events
Mar 31, 11 PM - Apr 2, 11 PM
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register today