Schedulers

SQL Server Agent

Job steps are rows in msdb, not files in git. Reads sysjobs, sysjobsteps and sysjobhistory.

A SQL Agent job is not a file. It is a set of rows in msdb, created through a dialog box, and in most estates there is no copy of it anywhere else. The step commands — frequently the actual ETL logic — live in msdb.dbo.sysjobsteps.command.

This makes SQL Agent the clearest illustration of why a repository parser cannot be the source of truth. There is nothing to parse. The definition that runs your nightly load exists in exactly one place, and it is a table.

What is read

What Decim reads from SQL Server Agent

Every item below is read-only, and each is a specific view, endpoint or file rather than a category of access. If something here is unacceptable in your environment, it can be removed from the query catalogue — see the agent for how that works.

SQL Server Agent — metadata sources
What From Why it matters
Job definitionsmsdb.dbo.sysjobsName, owner, enabled state, description
Step commandsmsdb.dbo.sysjobstepsThe actual command text — often the ETL itself
Run historymsdb.dbo.sysjobhistoryOutcome, duration and message per step per run
Live activitymsdb.dbo.sysjobactivityWhat is executing now, and what last ran
Schedulesmsdb.dbo.sysschedulesFrequency, interval and start time
Step flowsysjobsteps.on_success_actionBranching between steps — control edges
Proxiesmsdb.dbo.sysproxiesWhich credential a step runs under

Permissions required

Written out in full, because "read-only access" is not a specification. Nothing below grants the ability to write, and row access is requested only on the specific tables you name.

Grants on msdb sql
USE msdb;
CREATE USER decim_agent FOR LOGIN decim_agent;

GRANT SELECT ON dbo.sysjobs        TO decim_agent;
GRANT SELECT ON dbo.sysjobsteps    TO decim_agent;
GRANT SELECT ON dbo.sysjobhistory  TO decim_agent;
GRANT SELECT ON dbo.sysjobactivity TO decim_agent;
GRANT SELECT ON dbo.sysschedules   TO decim_agent;
GRANT SELECT ON dbo.sysjobschedules TO decim_agent;

-- SQLAgentReaderRole is the alternative and grants more than the above.
-- Prefer explicit table grants; role membership is harder to audit.

What it builds

What this source contributes to the pipeline topology and to the evidence available during an investigation:

  • Control edges between steps, including failure branches
  • Transform nodes from step command text
  • Schedules, which is how a stall with a clock gets explained
  • Run outcomes and durations for anomaly detection

Nodes learned from a definition are marked declared; nodes observed running are marked observed; nodes both declared and observed are verified. Where two sources disagree, the disagreement is recorded as a drift note rather than resolved silently.

Failure modes

Failure modes it surfaces

What this source is uniquely good at proving — and, just as usefully, at disproving. An investigation that can refute a hypothesis cheaply is worth as much as one that confirms it.

Failure modes SQL Server Agent evidence distinguishes
Failure mode The signal
Job silently disabledsysjobs.enabled = 0 with no failure anywhere
Step succeeded doing nothingDuration far below the step's own history
Job overlapped itselfTwo run instances with overlapping windows
Step failure swallowedon_fail_action set to continue to the next step

Limits

What this integration cannot tell you. Stated because an investigation that overstates its sources produces confident wrong answers, which is worse than an honest blocked.

  • sysjobhistory is trimmed by agent history limits — often 1,000 rows total, which on a busy instance is days rather than months
  • A job deleted and recreated loses all prior history and gets a new job_id
  • Step output files written to disk are not in msdb and need filesystem access to read

Related integrations

  • SQL Server — Reads catalog metadata, procedure bodies and write activity — the definitions git never sees.
  • SSIS — SSISDB holds executions, per-component row counts and the parameter values actually used.
  • cron & systemd timers — The scheduler with no database. Reads crontabs, timer units and journal history.

See all integrations, or how the sources are combined into one graph.

Get started

Investigating a SQL Server Agent pipeline?

Bring an incident you already know the answer to. If Decim gets it wrong, that is a more useful demo than one where it doesn't.