Condividi tramite


Spazio dei nomi Microsoft.SqlServer.Management.Smo.Agent

The Microsoft.SqlServer.Management.Smo.Agent namespace contains classes that represent the SQL Server Agent.

The Microsoft.SqlServer.Management.Smo.Agent namespace represents the SQL Server Agent. After a connection to an instance of SQL Server has been established by using the Server object variable, you can use the objects in the Microsoft.SqlServer.Management.Smo.Agent namespace to manage the SQL Server Agent.

The Microsoft.SqlServer.Management.Smo.Agent namespace resides in the Microsoft.SqlServer.Smo.dll assembly file. Also, some of the enumeration classes are in the Microsoft.SqlServer.SqlEnum.dll and Microsoft.SqlServer.SmoEnum.dll assembly files. You will have to import all three files to access the classes in the Microsoft.SqlServer.Management.Smo.Agent namespace.

By using the Microsoft.SqlServer.Management.Smo.Agent namespace, you can do the following:

  • View and modify SQL Server Agent settings.

  • Set up and manage operators.

  • Set up and manage alerts based on system messages or performance conditions.

  • Set up and manage jobs with multiple steps and schedules.

  • Manage proxy accounts for the subsystems on which jobs run.

  • Manage jobs that run on multiple servers.

Classi

  Classe Descrizione
Classe pubblica AgentObjectBase Non fare riferimento direttamente a questo membro nel codice. Supporta l'infrastruttura di SQL Server. The AgentObjectBase class is a base class that is inherited by all the SQL Server Agent classes and contains common members.
Classe pubblica Alert The Alert class represents a Microsoft SQL Server Agent alert.
Classe pubblica AlertCategory The AlertCategory class contains attributes that allow alerts to be categorized.
Classe pubblica AlertCategoryCollection The AlertCategoryCollection class represents a collection of AlertCategory objects that represent all the categories defined on the parent object.
Classe pubblica AlertCollection The AlertCollection class represents a collection of Alert objects that represent all the alerts defined on the parent object.
Classe pubblica AlertSystem The AlertSystem class contains system information pertaining to all alerts defined on the instance of Microsoft SQL Server.
Classe pubblica CategoryBase Non fare riferimento direttamente a questo membro nel codice. Supporta l'infrastruttura di SQL Server. The CategoryBase class is a base class that is used in the construction of the JobCategory class, the OperatorCategory class, and the AlertCategory class. It contains functionality that is common to all three category classes.
Classe pubblica Job The Job class represents a Microsoft SQL Server Agent job.
Classe pubblica JobCategory The JobCategory class contains attributes that allow alerts to be categorized.
Classe pubblica JobCategoryCollection La classe JobCategoryCollection rappresenta una raccolta di oggetti JobCategory che rappresentano tutte le categorie definite nell'oggetto padre.
Classe pubblica JobCollection The JobCollection class represents a collection of Job objects that represent all the jobs defined on the JobServer object.
Classe pubblica JobFilter The JobFilter object is used to store information about the constraints applied to the EnumJobs method of the JobServer object.
Classe pubblica JobHistoryFilter The JobHistoryFilter object is used to store information about the constraints applied to the EnumJobHistory method of the JobServer object.
Classe pubblica JobSchedule The JobSchedule class represents a SQL Server Agent job schedule.
Classe pubblica JobScheduleCollection The JobScheduleCollection class represents a collection of JobSchedule objects that represent all the job schedules defined on the parent object.
Classe pubblica JobServer The JobServer object represents the SQL Server Agent subsystem and the msdb database.
Classe pubblica JobStep The JobStep class represents a Microsoft SQL Server job step.
Classe pubblica JobStepCollection The JobStepCollection class represents a collection of JobStep objects that represent all the job steps defined on the parent Job object.
Classe pubblica Operator The Operator class represents a SQL Server Agent operator.
Classe pubblica OperatorCategory The OperatorCategory class contains attributes that allow operators to be categorized.
Classe pubblica OperatorCategoryCollection The OperatorCategoryCollection class represents a collection of OperatorCategory objects that represent all the categories defined on the parent object.
Classe pubblica OperatorCollection The OperatorCollection class represents a collection of Operator objects that represent all the operators defined on the JobServer object.
Classe pubblica ProxyAccount The ProxyAccount class represents a SQL Server Agent proxy account.
Classe pubblica ProxyAccountCollection The ProxyAccountCollection class represents a collection of ProxyAccount objects that represent all the proxy accounts defined on SQL Server Agent.
Classe pubblica ScheduleBase Non fare riferimento direttamente a questo membro nel codice. Supporta l'infrastruttura di SQL Server. The ScheduleBase class is a base class that is inherited by the JobSchedule class.
Classe pubblica TargetServer The TargetServer object represents a target server defined for multiserver administration on SQL Server Agent.
Classe pubblica TargetServerCollection The TargetServerCollection class represents a collection of TargetServer objects that represent all the target servers defined on SQL Server Agent.
Classe pubblica TargetServerGroup The TargetServerGroup object that represent a target server group defined for multi-server administration on SQL Server Agent.
Classe pubblica TargetServerGroupCollection La classe TargetServerGroupCollection rappresenta una raccolta di oggetti TargetServerGroup che rappresentano tutti i gruppi di server di destinazione definiti in SQL Server Agent.

Enumerazioni

  Enumerazione Descrizione
Enumerazione pubblica ActivationOrder L'enumerazione ActivationOrder contiene valori utilizzati per specificare quando viene eseguito il trigger in relazione ad altri trigger collegati a una data operazione di inserimento, aggiornamento o eliminazione.
Enumerazione pubblica AgentLogLevels The AgentLogLevels enumeration contains values that are used to specify the type of errors or messages that are logged by SQL Server. This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
Enumerazione pubblica AgentMailType The AgentMailType enumeration contains values that are used to specify the source of mail.
Enumerazione pubblica AgentSubSystem The AgentSubSystem enumeration contains values that are used to specify the Microsoft SQL Server subsystems that can be used by job steps.
Enumerazione pubblica AlertType The AlertType enumeration contains values that are used to specify the type of event or performance condition that causes alerts to be raised.
Enumerazione pubblica CategoryType The CategoryType enumeration is a list of constant values that specify the type of category, such as whether the category refers to local jobs or multiserver administration.
Enumerazione pubblica CompletionAction The CompletionAction enumeration is a list of constant values that specify the circumstances when a job completes after which another action is executed.
Enumerazione pubblica CompletionResult The CompletionResult enumeration is a list of constant values that specify the status on completion of a job or job step.
Enumerazione pubblica FindOperand L'enumerazione FindOperand rappresenta un elenco di operandi utilizzati per valutare le proprietà DateJobCreated e DateJobLastModified per specificare un intervallo di date in un filtro del processo.
Enumerazione pubblica FrequencyRelativeIntervals The FrequencyRelativeIntervals enumeration contains values that are used to specify the ordinal position of a recurring occurrence within a specified period.
Enumerazione pubblica FrequencySubDayTypes L'enumerazione FrequencySubDayTypes contiene valori utilizzati per specificare la modalità di gestione della pianificazione nel periodo di un giorno.
Enumerazione pubblica FrequencyTypes The FrequencyTypes enumeration contains values that are used to specify how often a schedule is executed.
Enumerazione pubblica JobExecutionStatus The JobExecutionStatus enumeration is a list of constant values that specify the execution status of a job or job step.
Enumerazione pubblica JobOutcome The JobOutcome enumeration is a list of constant values that specify the outcome after running a job.
Enumerazione pubblica JobServerType The JobServerType enumeration is a list of constant values that specify the type of server with regard to multiserver or stand-alone administration.
Enumerazione pubblica JobStepFlags L'enumerazione JobStepFlags è un elenco di valori costanti che specificano il file a cui accodare le informazioni sulla cronologia dei processi.
Enumerazione pubblica JobType The JobType enumeration is a list of constant values that specify the location where the job is run (locally or on multiple servers).
Enumerazione pubblica MonthlyRelativeWeekDays L'enumerazione MonthlyRelativeWeekDays contiene valori che specificano i giorni della settimana, i giorni feriali, i fine settimana oppure ogni giorno.
Enumerazione pubblica NotifyMethods The NotifyMethods enumeration contains values that specify the method used to notify operators in an alert or a job. This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
Enumerazione pubblica NotifyType The NotifyType enumeration contains values that are used to specify the notification type that restricts the output of the Alert object's EnumNotifications method.
Enumerazione pubblica OSRunPriority The OSRunPriority enumeration contains constant values that specify the levels of priority given to running the operating system.
Enumerazione pubblica StepCompletionAction The StepCompletionAction enumeration contains values that specify the action taken on completion of a job step.
Enumerazione pubblica TargetServerStatus The TargetServerStatus enumeration contains values that specify the status of a target server. This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
Enumerazione pubblica WeekDays The WeekDays enumeration contains constant values that specify the days of the week.