Metodo Drop

Removes an existing job.

Questo membro è sottoposto a overload. Per informazioni complete su questo membro, inclusi sintassi, utilizzo ed esempi, fare clic su un nome nell'elenco di overload.

Elenco degli overload

  Nome Descrizione
Metodo pubblico Drop() () () () Removes an existing job.
Metodo pubblico Drop(Boolean) Removes an existing job.

In alto

Esempi

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()