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

Job.DeleteLevel 속성

Gets or sets the completion action that determines whether to delete the job definition when the job finishes execution.

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

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

속성 값

유형: Microsoft.SqlServer.Management.Smo.Agent.CompletionAction
A CompletionAction object value that specifies whether to delete the job definition.

If directed, Microsoft SQL Server Agent can delete a job definition when execution succeeds or fails. Jobs can also be deleted regardless of success or failure of the job. By default, jobs are not deleted when execution finishes.

The following code example creates a new job and displays the date on which it was last modified.

C#

Server srv = new Server("(local)");
Job jb = new Job(srv.JobServer, "Test Job");
jb.DeleteLevel = 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.DeleteLevel = [Micrososft.SqlServer.Management.Smo.Agent.CompletionAction]::Always

커뮤니티 추가 항목

추가
표시: