Export (0) Print
Expand All

Create a Job Category

 

This topic describes how to create a job category in SQL Server 2014 by using SQL Server Management Studio, Transact-SQL or SQL Server Management Objects.

SQL Server Agent provides built-in job categories that you can assign jobs to, or you can create a job category and assign jobs to it. Job categories help you organize your jobs for easy filtering and grouping. For example, you can organize all your database backup jobs in the Database Maintenance category. You can also create your own job categories.

In This Topic

To create a job category

  1. In Object Explorer, click the plus sign to expand the server where you want to create a job category.

  2. Click the plus sign to expand SQL Server Agent.

  3. Right-click the Jobs folder and select Manage Job Categories.

  4. In the Manage Job Categoriesserver_name dialog box, click Add.

  5. In the new dialog box, in the Name box, enter a name for the new job category.

  6. Select the Show all jobs check box. Select one or more jobs for the new category by checking the boxes corresponding to the jobs.

  7. Click OK.

  8. In the Manage Job Categoriesserver_name dialog box, click Refresh to ensure that the new job category is active. If everything looks as expected, close this dialog box.

For more information on these dialog boxes, see Job Categories / Manage Job Categories and Job Categories Properties / New Job Category.

Arrow icon used with Back to Top linkUnable to find bookmark 'Top' in topic '{"project_id":"acb1e239-07de-4739-ad90-d32720c7417b","entity_id":"e24a6d38-d231-4f64-ab89-2d1ef6f5792c","entity_type":"Article","locale":"en-US"}'. Rebuild topic '{"project_id":"acb1e239-07de-4739-ad90-d32720c7417b","entity_id":"e24a6d38-d231-4f64-ab89-2d1ef6f5792c","entity_type":"Article","locale":"en-US"}' may solve the problem.

To create a job category

  1. In Object Explorer, connect to an instance of Database Engine.

  2. On the Standard bar, click New Query.

  3. Copy and paste the following example into the query window and click Execute.

    -- creates a local job category named AdminJobs 
    USE msdb ;
    GO
    EXEC dbo.sp_add_category
        @class=N'JOB',
        @type=N'LOCAL',
        @name=N'AdminJobs' ;
    GO
    

For more information, see sp_add_category (Transact-SQL).

Arrow icon used with Back to Top linkUnable to find bookmark 'Top' in topic '{"project_id":"acb1e239-07de-4739-ad90-d32720c7417b","entity_id":"e24a6d38-d231-4f64-ab89-2d1ef6f5792c","entity_type":"Article","locale":"en-US"}'. Rebuild topic '{"project_id":"acb1e239-07de-4739-ad90-d32720c7417b","entity_id":"e24a6d38-d231-4f64-ab89-2d1ef6f5792c","entity_type":"Article","locale":"en-US"}' may solve the problem.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft