Table of Contents

Class BatchEnd

Namespace
ItTiger.TigerQuery.Events
Assembly
ItTiger.TigerQuery.dll
Describes the outcome of a batch execution attempt.
public sealed class BatchEnd
Inheritance
BatchEnd
Inherited Members

Properties

BatchNumber

Gets the one-based logical batch number in parser order.
public int BatchNumber { get; init; }

Property Value

int

Duration

Gets elapsed time for this execution attempt.
public TimeSpan Duration { get; init; }

Property Value

TimeSpan

Exception

Gets the error recorded for the attempt, or null on success.
public Exception? Exception { get; init; }

Property Value

Exception

Remarks

A server error reported without a thrown exception is represented by a SqlBatchErrorException carrying the original diagnostics.

ExecutionCount

Gets the repeat count for the current logical batch.
public int ExecutionCount { get; init; }

Property Value

int

ExecutionIndex

Gets the one-based execution index within the current logical batch.
public int ExecutionIndex { get; init; }

Property Value

int

OverallExecutionNumber

Gets the one-based execution attempt number across the whole run.
public long OverallExecutionNumber { get; init; }

Property Value

long

Remarks

The value matches the corresponding batch-start callback, whose invocation advances the counter. Failed attempts retain the same value. It represents batch execution progress, not progress within a SQL batch.

Success

Gets whether the execution attempt completed without an error.
public bool Success { get; init; }

Property Value

bool

Remarks

An attempt fails either because an exception was caught or because SQL Server reported an error (severity 11 or higher) for it. The provider delivers such user errors as informational messages rather than throwing, so a batch can end unsuccessfully even though execution returned normally.

TotalExecutionCount

Gets the total scheduled execution attempts in the complete prepared plan, or null when the total is unknown in streaming mode.
public long? TotalExecutionCount { get; init; }

Property Value

long?

Remarks

null means unknown, not zero. In prepared mode the value includes positive GO n repeat counts and continues to describe the complete plan when execution stops early. It does not estimate progress within a SQL batch.

TotalLogicalBatchCount

Gets the total number of logical batches in the complete prepared plan, or null when the total is unknown in streaming mode.
public int? TotalLogicalBatchCount { get; init; }

Property Value

int?

Remarks

null means unknown, not zero. In prepared mode the value describes the complete plan even when execution stops early. It represents batch execution progress, not progress within a SQL batch.