get_job_history
Retrieve execution history for a SQL Server Agent job. Specify the exact job name and optionally limit results to the most recent entries.
Instructions
Get execution history for a SQL Server Agent job. Requires membership in SQLAgentUserRole (or higher) in the msdb database.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | Number of most-recent history entries to return (default: 50, max: 500) | |
| job_name | Yes | Exact job name |