Change the Membership of a Job Category
This topic describes how to change the membership of the job category in SQL Server 2014 by using SQL Server Management Studio, Transact-SQL, or SQL Server Management Objects.
Job categories help you organize your jobs for easy filtering and grouping. You can create your own job categories. You can also change Microsoft SQL Server Agent jobs membership in job categories.
In This Topic
Before you begin:
To change the membership of a job category, using:
Before You Begin
Security
For detailed information, see Implement SQL Server Agent Security.
Using SQL Server Management Studio
To change the membership of a job category
In Object Explorer, click the plus sign to expand the server where you want to edit a job category.
Click the plus sign to expand SQL Server Agent.
Right-click the Jobs folder and select Manage Job Categories.
In the Manage Job Categoriesserver_name dialog box, select the job category that you want to edit, and then click View Jobs.
Select the Show all jobs check box.
To add a job to the category, in the main grid, select the check box in the Select column corresponding to the job. To remove a job from the category, clear the box. When finished, click OK.
Close the Manage Job Categoriesserver_name dialog box.
Using Transact-SQL
To change the membership of a job category
In Object Explorer, connect to an instance of Database Engine.
On the Standard bar, click New Query.
Copy and paste the following example into the query window and click Execute.
-- adding a new job category to the "NightlyBackups" job USE msdb ; GO EXEC dbo.sp_update_job @job_name = N'NightlyBackups', @category_name = N'[Uncategorized (Local)]'; GO
For more information, see sp_update_job (Transact-SQL).
Using SQL Server Management Objects
To change the membership of a job category
Use the JobCategory
class by using a programming language that you choose, such as Visual Basic, Visual C#, or PowerShell.