JobServer.EnumJobs 方法

Enumerates a list of information about the current job.

命名空间:  Microsoft.SqlServer.Management.Smo.Agent
程序集:  Microsoft.SqlServer.Smo(在 Microsoft.SqlServer.Smo.dll 中)

语法

声明
Public Function EnumJobs As DataTable
用法
Dim instance As JobServer 
Dim returnValue As DataTable 

returnValue = instance.EnumJobs()
public DataTable EnumJobs()
public:
DataTable^ EnumJobs()
member EnumJobs : unit -> DataTable
public function EnumJobs() : DataTable

返回值

类型:System.Data.DataTable
A DataTable object value that contains a table of information about SQL Server Agent jobs. The table describes the different columns of the returned DataTable.

Column

Data type

Description

Urn

String

A URN value that uniquely identifies the job.

Name

String

The name of the job.

JobID

Guid

A unique system-generated ID value.

DateCreated

DateTime

The date and time when the job was created.

DateLastModified

DateTime

The date and time when the job was last modified.

Description

String

The textual description of the job.

EmailLevel

Int32

The numeric value that specifies the required way in which the job completes for an e-mail to be sent after execution that is listed in the CompletionAction enumeration.

IsEnabled

Boolean

The Boolean value that specifies whether the job is enabled.

If True, the job is enabled.

If False, the job is not enabled.

EventLogLevel

Int32

The numeric value that specifies the required way in which the job completes for an event to be logged after execution that is listed in the CompletionAction enumeration.

NetSendLevel

Int32

The numeric value that specifies the required way in which the job completes for a net send network message to be sent after execution that is listed in the CompletionAction enumeration.

OriginatingServer

String

The name of the instance of SQL Server that is the master server in a multiserver administration scenario.

OwnerLoginName

String

The name of the login that owns the job.

PageLevel

Int32

The numeric value that specifies the required way in which the job completes for a pager message to be sent after execution that is listed in the CompletionAction enumeration.

StartStepID

Int32

The ID value of the job step that is first in the sequence of job steps that belong to the job.

VersionNumber

Int32

The version number of the job.

CategoryID

Int32

The job category ID number.

示例

在 SQL Server 代理中计划自动管理任务

请参阅

参考

JobServer 类

EnumJobs 重载

Microsoft.SqlServer.Management.Smo.Agent 命名空间

其他资源

自动执行管理任务(SQL Server 代理)

sp_help_job (Transact-SQL)