查看作业分类
--方法一 EXEC msdb.dbo.sp_help_category; --方法二 SELECT category_id ,--作业类别ID category_class ,--类别中项目类型:1=作业2=警报 3=操作员 category_type ,--类别中类型:=本地、=多服务器、=无 name --分类名称 FROM msdb.dbo.syscategories
添加作业分类
EXEC msdb.dbo.sp_add_category @class=N'JOB', @type=N'LOCAL', @name=N'DBA_MONITORING' ; GO SELECT * FROM msdb.dbo.syscategories WHERE NAME='DBA_MONITORING'
修改作业分类
EXEC msdb.dbo.sp_update_category @class=N'JOB', @name=N'DBA_MONITORING', @new_name=N'NEW_DBA_MONITORING'
删除作业分类
EXEC msdb.dbo.sp_delete_category @name = N'New_DBA_MONITORING', @class = N'JOB' ; GO