Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Include Protected Members
Include Inherited Members
Removes an existing job.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
Overload List
Name | Description | |
---|---|---|
![]() |
Drop() | Removes an existing job. |
![]() |
Drop(Boolean) | Removes an existing job. |
Top
Examples
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()