CurrentExecutionStatus Property

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。新規の開発作業ではこの機能を使用しないようにし、現在この機能を使用しているアプリケーションは修正することを検討してください。

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.

構文

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:

JobFilter Object