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()
实现
示例
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()