JobServer.EnumJobs Method (JobFilter)
Enumerates a list of information about current jobs.
네임스페이스: Microsoft.SqlServer.Management.Smo.Agent
어셈블리: Microsoft.SqlServer.Smo (in microsoft.sqlserver.smo.dll)
구문
‘선언
Public Function EnumJobs ( _
filter As JobFilter _
) As DataTable
public DataTable EnumJobs (
JobFilter filter
)
public:
DataTable^ EnumJobs (
JobFilter^ filter
)
public DataTable EnumJobs (
JobFilter filter
)
public function EnumJobs (
filter : JobFilter
) : DataTable
매개 변수
- filter
A JobFilter object value that is used to specify constraints to restrict output.
반환 값
A DataTable object value that contains a table of information about Microsoft 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. |
Category |
String |
The name of the category to which the job is assigned. |
CurrentRunRetryAttempt |
Int32 |
The number of attempts, including the current attempt, that the job has been run and retried. |
CurrentRunStatus |
Int32 |
The numeric value that represents a specific execution status that is listed in the JobExecutionStatus enumeration. |
CurrentRunStep |
Int32 |
The numeric value that identifies the currently running job step. |
DateCreated |
DateTime |
The date and time when the job was created. |
DateLastModified |
DateTime |
The date and time when the job was last modified. |
DeleteLevel |
Int32 |
The numeric value that specifies the required way in which the job completes for the job to be deleted after execution that is listed in the CompletionAction enumeration. |
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. |
HasSchedule |
Boolean |
The Boolean value that specifies whether the job has at least one schedule assigned to it. If True, the job has at least one schedule. If False, the job has no schedules. |
HasServer |
Boolean |
The Boolean value that specifies whether the job is scheduled to run on a target server in a multiserver administration scenario. If True, the job has at least one target server. If False, the job does not have a target server. |
HasStep |
Boolean |
The Boolean value that specifies whether the job has at least one job step assigned to it. If True, the job has at least one job step. If False, the job does not have a job step. |
LastRunDate |
DateTime |
The date and time when the job was last executed. |
LastRunOutcome |
Int32 |
The numeric value that specifies the way in which the job completed the last time it was executed 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. |
NextRunDate |
DateTime |
The date and time when the job is next scheduled to run. |
NextRunScheduleID |
Int32 |
The numeric ID value that uniquely identifies the schedule to be used the next time the job runs. |
OperatorToEmail |
String |
The name of the operator to e-mail when the job requires that e-mail is sent on completion. |
OperatorToNetSend |
String |
The name of the operator to net send when the job requires that e-mail is sent on completion. |
OperatorToPage |
String |
The name of the operator to page when the job requires that e-mail is sent on completion. |
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 logon 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. |
JobType |
Int32 |
The numeric value that specifies the type of job that is listed in the JobType enumeration. |
VersionNumber |
Int32 |
The version number of the job. |
주의
이 네임스페이스, 클래스 또는 멤버는 Microsoft .NET Framework 2.0 버전에서만 지원됩니다.
예
How to: Create a Job with Steps and a Schedule in Visual Basic .NET
스레드 보안
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
플랫폼
개발 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
대상 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
참고 항목
참조
JobServer Class
JobServer Members
Microsoft.SqlServer.Management.Smo.Agent Namespace
관련 자료
관리 작업 자동화(SQL Server 에이전트)
Scheduling Automatic Administrative Tasks in SQL Server Agent
sp_help_job(Transact-SQL)