문서를 영문으로 보려면 영문 확인란을 선택하세요. 마우스 포인터를 텍스트 위로 이동시켜 팝업 창에서 영문 텍스트를 표시할 수도 있습니다.
번역
영문

Job.EventLogLevel 속성

Gets or sets the completion action that determines whether to generate an operating system event log entry when the job finishes execution.

네임스페이스:  Microsoft.SqlServer.Management.Smo.Agent
어셈블리:  Microsoft.SqlServer.Smo(Microsoft.SqlServer.Smo.dll)

[SfcPropertyAttribute(SfcPropertyFlags.Standalone)]
public CompletionAction EventLogLevel { get; set; }

속성 값

유형: Microsoft.SqlServer.Management.Smo.Agent.CompletionAction
A CompletionAction value that specifies whether to generate an operating system event log entry.

If directed, Microsoft SQL Server Agent can generate an event log entry when execution succeeds or fails. Event log entries can also be generated regardless of success or failure of the job. By default, event log entries are not generated when execution finishes.

The following code example sets the job to generate an operating system event log entry when the job execution finishes.

C#

Server srv = new Server("(local)");
Job jb = new Job(srv.JobServer, "Test Job");
jb.EventLogLevel = CompletionAction.Always;

PowerShell

$srv = new-object Microsoft.SqlServer.Management.Smo.Server("(local)")
$jb = new-object Microsoft.SqlServer.Management.Smo.Agent.Job($srv.JobServer, "Test Job")
$jb.EventLogLevel = [Microsoft.SqlServer.Management.Smo.Agent.CompletionAction]::Always

커뮤니티 추가 항목

추가
표시: