Skip to content

Latest commit

 

History

History
66 lines (49 loc) · 3.71 KB

view-or-modify-jobs.md

File metadata and controls

66 lines (49 loc) · 3.71 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic helpviewer_keywords monikerRange
View or Modify Jobs
View or Modify Jobs
markingmyname
maghan
01/19/2017
sql
ssms
how-to
jobs [SQL Server Agent], modifying
jobs [SQL Server Agent], viewing
modifying jobs
viewing jobs
SQL Server Agent jobs, viewing
SQL Server Agent jobs, modifying
displaying jobs
= azuresqldb-mi-current || >= sql-server-2016

View or Modify Jobs

[!INCLUDE SQL Server SQL MI]

Important

On Azure SQL Managed Instance, most, but not all SQL Server Agent features are currently supported. See Azure SQL Managed Instance T-SQL differences from SQL Server for details.

You can view any job you have created. After you have run a job, you can also view its history. Viewing a job's history allows you to see when the job ran, the status of the job as a whole, and the status of each job step in the job. You can see whether the job ever failed in the past, when the job last completed successfully, and what output the job created each time the job ran. Members of the sysadmin fixed server role can view or modify any job, regardless of the owner.

Note

A job must have been executed at least one time for there to be a job history. You can limit the total size of the job history log and the size per job.

Finally, you can modify a job to meet new requirements. You can modify:

  • Response options

  • Schedules

  • Job steps

  • Ownership

  • Job category

  • Target servers (multiserver jobs only)

To make sure that changes to multiserver jobs take effect, you must post the changes to the download list so that target servers can download the updated job. To ensure that target servers have the most current job definitions, post an INSERT instruction after you update the multiserver job as follows:

EXECUTE sp_post_msx_operation 'INSERT', 'JOB', '<job id>'  

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

Members of the sysadmin fixed server role can view the definition or history of any job, and can modify any job.

Related Tasks

Description Topic
Describes how to view [!INCLUDEmsCoName] [!INCLUDEssNoVersion] Agent jobs. View a Job
Describes how to view the [!INCLUDEmsCoName] [!INCLUDEssNoVersion] Agent job history log. View the Job History
Describes how to delete the contents of the [!INCLUDEmsCoName] [!INCLUDEssNoVersion] Agent job history log. Clear the Job History Log
Describes how to set size limits for [!INCLUDEmsCoName] [!INCLUDEssNoVersion] Agent job history logs. Resize the Job History Log
Describes how to change the properties of [!INCLUDEmsCoName] [!INCLUDEssNoVersion] Agent jobs. Modify a Job

See Also

sysjobhistory