다음을 통해 공유


Drop 메서드

Removes an existing job.

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

구문

‘선언
Public Sub Drop
‘사용 방법
Dim instance As Job

instance.Drop()
public void Drop()
public:
virtual void Drop() sealed
abstract Drop : unit -> unit 
override Drop : unit -> unit 
public final function Drop()

구현

IDroppable. . :: . .Drop() () () ()

The following code example creates a job, then drops it.

C#

Server srv = new Server("(local)");
Job jb = new Job(srv.JobServer, "Test Job");
jb.Create();
jb.Drop();

PowerShell

$srv = new-object Microsoft.SqlServer.Management.Smo.Server("(local)")
$jb = new-object Microsoft.SqlServer.Management.Smo.Agent.Job($srv.JobServer, "EFSD Job")
$jb.Create()
$jb.Drop()