Freigeben über


CurrentExecutionStatus Property

Diese Funktion wird in zukünftigen Versionen von Microsoft SQL Server nicht mehr bereitgestellt. Verwenden Sie diese Funktion beim Entwickeln neuer Anwendungen nicht, und planen Sie das Ändern von Anwendungen, in denen es zurzeit verwendet wird.

The CurrentExecutionStatus property filters jobs listed in the JobServer object EnumJobs method, restricting the returned QueryResults object to list only those jobs whose execution state matches the value set.

Syntax

object.CurrentExecutionStatus [=value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list.

  • value
    Specifies a job execution status as described in Settings.

Data Type

Long, enumerated

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetCurrentExecutionStatus(
SQLDMO_JOBEXECUTION_STATUS* pRetVal);
HRESULT SetCurrentExecutionStatus(
SQLDMO_JOBEXECUTION_STATUS NewValue);

Settings

Constant

Value

Description

SQLDMOJobExecution_/BetweenRetries

3

Lists only jobs waiting for a retry attempt time slice to end.

SQLDMOJobExecution_/Executing

1

Lists only executing jobs.

SQLDMOJobExecution_Idle

4

Lists only jobs awaiting scheduled execution.

SQLDMOJobExecution_/PerformingCompletionActions

7

Lists only jobs logging job history or performing other cleanup tasks.

SQLDMOJobExecution_/Suspended

5

Lists only suspended jobs.

SQLDMOJobExecution_Unknown

0

Ignores execution status when filtering.

SQLDMOJobExecution_/WaitingForStepToFinish

6

Lists only jobs that are waiting for a step to finish.

SQLDMOJobExecution_/WaitingForWorkerThread

2

Lists only jobs blocked because they are waiting for an execution thread resource.

Applies To: