Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Removes an existing job.
Namespace: Microsoft.SqlServer.Management.Smo.Agent
Assembly: Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)
Syntax
'Declaration
Public Sub Drop
'Usage
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()
Implements
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()
See Also
Reference
Microsoft.SqlServer.Management.Smo.Agent Namespace
Other Resources
Automated Administration Tasks (SQL Server Agent)
Scheduling Automatic Administrative Tasks in SQL Server Agent