다음을 통해 공유


GetJobByID Method

Microsoft SQL Server의 이후 버전에서는 이 기능이 제거됩니다. 새 개발 작업에서는 이 기능을 사용하지 않도록 하고, 현재 이 기능을 사용하는 응용 프로그램은 수정하십시오.

The GetJobByID method returns a SQL Distributed Management Objects (SQL-DMO) Job object referencing the SQL Server Agent job identified by the specified job identifier.

구문

object
.GetJobByID(
Name
, [ Flag ] )asJob

Parts

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

  • Name
    String representation of a SQL Server Agent job identifier.

  • Flag
    When TRUE, the GetJobByID method queries an instance of Microsoft SQL Server for the most recent copy of the job. When FALSE (default) and the application has cached the define jobs in a collection, only the cached collection is searched.

Prototype (C/C++)

HRESULT GetJobByID(
SQLDMO_LPCSTR szName,
LPSQLDMOJOB* ppJob,
BOOL bFlag = FALSE);

Returns

A Job object.

주의

SQL Server Agent jobs are uniquely identified by a system-generated identifier. The identifier is a 32-character string representing a hexadecimal number and is visible in the JobID property of a SQL-DMO Job object.

Applies To: