次の方法で共有


JobID Property

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

The JobID property is a string representing the unique identifier of a SQL Server Agent job.

構文

object
.JobID [=value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list
  • value
    A string representation of a globally unique identifier (GUID)

Data Type

String

Modifiable

Read/write for the Alert and JobHistoryFilter objects. Read-only for the Job object.

Prototype (C/C++)

HRESULT GetJobID(SQLDMO_LPBSTR pRetVal);
HRESULT SetJobID(SQLDMO_LPCSTR NewValue);
ms131922.note(ja-jp,SQL.90).gifメモ :
SQL Distributed Management Objects (SQL-DMO) strings are always returned as OLE BSTR objects. A C/C++ application obtains a reference to the string. The application must release the reference by using SysFreeString.

解説

Each SQL Server Agent job is identified by a system-generated GUID. The identifier is a 32-character string representing a hexadecimal number.

For the Alert object, the JobID property represents the job identifier of the SQL Server Agent job run in response to the represented alert. The property is used to assign a job to an alert. The JobName property of the Alert object is read-only.

Setting the JobID property on the JobHistoryFilter object restricts the output of the EnumJobHistory method of the JobServer object. If used, the output includes only historical data for the identified SQL Server Agent job.

Applies To:

Alert Object

JobHistoryFilter Object

Job Object