SQL Flow Field Guide

sp_help_jobhistory

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

Provides information about the jobs for servers in the multiserver administration domain.

What changes

Input
Provides information about the jobs for servers in the multiserver administration domain.
Output or change
No write is stated in the Microsoft summary.

Syntax at a glance

dbo.sp_help_jobhistory
    [ [ @job_id = ] 'job_id' ]
    [ , [ @job_name = ] N'job_name' ]
    [ , [ @step_id = ] step_id ]
    [ , [ @sql_message_id = ] sql_message_id ]
    [ , [ @sql_severity = ] sql_severity ]
    [ , [ @start_run_date = ] start_run_date ]
    [ , [ @end_run_date = ] end_run_date ]
    [ , [ @start_run_time = ] start_run_time ]
    [ , [ @end_run_time = ] end_run_time ]
    [ , [ @minimum_run_duration = ] minimum_run_duration ]
    [ , [ @run_status = ] run_status ]
    [ , [ @minimum_retries = ] minimum_retries ]
    [ , [ @oldest_first = ] oldest_first ]
    [ , [ @server = ] N'server' ]
    [ , [ @mode = ] 'mode' ]
[ ; ]

Work example

Provides information about the jobs for servers in the multiserver administration domain.

Write a proposed call on paper. Name the target, required permission, expected change, and recovery step before any lab use.

Check your work What can this procedure change or start, and what permission does it need?

Open Microsoft Learn for full syntax, permissions, and details for your version.