sysjobstepslogs

sysjobstepslogs#

Contains a row for each attempt of a job step recorded in the metabase, with the error the attempt ended with. Every node of a cluster reports the same rows, also right after a failover, including the steps of jobs that have not run since the Querona service started and of jobs deleted with @delete_history = 0. A step that is running is reported from its start. Rows that the retention policy purged are no longer reported.

Column name

Data type

Description

log_id

int

Number of the row, among the rows the user sees, in the order the step attempts started.

log

nvarchar(max)

Error the step attempt ended with; empty when it succeeded or still runs.

date_created

datetime

Date and time the step attempt started, in the local time of the node that ran it.

date_modified

datetime

Date and time the step attempt ended; the start while it runs.

log_size

bigint

Size of log in bytes.

step_uid

uniqueidentifier

ID of the step.

Differences from SQL Server#

  • SQL Server Agent writes a row only for a step whose output is logged to a table (@flags = 8), with the output of the step; Querona writes a row for every step attempt, with the error it ended with.

  • log_id numbers the rows when they are read, so the numbers move when the retention policy purges older history and can differ between users who see different jobs; SQL Server Agent assigns an identity when it writes the row.

  • At most the steps of the 10,000 most recently started executions are reported. An attempt recorded without the ID of its step is not reported.

  • A user without the VIEW ANY JOB permission sees the steps of the existing jobs they own now, as sysjobhistory reports their history, on every node and whether the job scheduler runs or not.

See also#