Export (0) Print
Expand All
Expand Minimize

Microsoft.SqlServer.Management.Smo.Agent Namespace

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

Updated text: 17 July 2006

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.Sm.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.

Release

History

17 July 2006

Changed content:
  • Added text to the Remarks section.

ClassDescription
AgentObjectBaseThe AgentObjectBase class is a base class that is inherited by all the SQL Server Agent classes and contains common members.
AlertThe Alert class represents a Microsoft SQL Server Agent alert.
AlertCategoryThe AlertCategory class contains attributes that allow alerts to be categorized.
AlertCategoryCollectionThe AlertCategoryCollection class represents a collection of AlertCategory objects that represent all the categories defined on the parent object.
AlertCollectionThe AlertCollection class represents a collection of Alert objects that represent all the alerts defined on the parent object.
AlertSystemThe AlertSystem class contains system information pertaining to all alerts defined on the instance of Microsoft SQL Server.
CategoryBaseThe 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.
JobThe Job class represents a Microsoft SQL Server Agent job.
JobBaseCollectionThe JobBaseCollection class represents a collection of Agent objects. The JobBaseCollection object is a base class that is inherited by the Agent collection classes.
JobCategoryThe JobCategory class contains attributes that allow alerts to be categorized.
JobCategoryCollectionThe JobCategoryCollection class represents a collection of JobCategory objects that represent all the categories defined on the parent object.
JobCollectionThe JobCollection class represents a collection of Job objects that represent all the jobs defined on the JobServer object.
JobFilterThe JobFilter object is used to store information about the constraints applied to the EnumJobs method of the JobServer object.
JobHistoryFilterThe JobHistoryFilter object is used to store information about the constraints applied to the EnumJobHistory method of the JobServer object.
JobScheduleThe JobSchedule class represents a SQL Server Agent job schedule.
JobScheduleCollectionThe JobScheduleCollection class represents a collection of JobSchedule objects that represent all the job schedules defined on the parent object.
JobServerThe JobServer object represents the Microsoft SQL Server Agent subsystem and the MSDB database.
JobStepThe JobStep class represents a Microsoft SQL Server job step.
JobStepCollectionThe JobStepCollection class represents a collection of JobStep objects that represent all the job steps defined on the parent Job object.
OperatorThe Operator class represents a SQL Server Agent operator.
OperatorCategoryThe OperatorCategory class contains attributes that allow operators to be categorized.
OperatorCategoryCollectionThe OperatorCategoryCollection class represents a collection of OperatorCategory objects that represent all the categories defined on the parent object.
OperatorCollectionThe OperatorCollection class represents a collection of Operator objects that represent all the operators defined on the JobServer object.
ProxyAccountThe ProxyAccount class represents a SQL Server Agent proxy account.
ProxyAccountCollectionThe ProxyAccountCollection class represents a collection of ProxyAccount objects that represent all the proxy accounts defined on SQL Server Agent.
ScheduleBaseThe ScheduleBase class is a base class that is inherited by the JobSchedule class.
TargetServerThe TargetServer object represents a target server defined for multiserver administration on SQL Server Agent.
TargetServerCollectionThe TargetServerCollection class represents a collection of TargetServer objects that represent all the target servers defined on SQL Server Agent.
TargetServerGroupThe TargetServerGroup object that represent a target server group defined for multiserver administration on SQL Server Agent.
TargetServerGroupCollectionThe TargetServerGroupCollection class represents a collection of TargetServerGroup objects that represent all the target server groups defined on SQL Server Agent.

EnumerationDescription
ActivationOrderThe ActivationOrder enumeration contains values that are used to specify when the trigger runs in relation to the insert, update, or delete operation.
AgentLogLevelsThe AgentLogLevels enumeration contains values that are used to specify the type of errors or messages that are logged by SQL Server Agent. This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
AgentMailTypeThe AgentMailType enumeration contains values that are used to specify the source of mail.
AgentSubSystemThe AgentSubSystem enumeration contains values that are used to specify the Microsoft SQL Server subsystems that can be used by job steps.
AlertTypeThe AlertType enumeration contains values that are used to specify the type of event or performance condition that causes alerts to be raised.
CategoryTypeThe 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.
CompletionActionThe CompletionAction enumeration is a list of constant values that specify the circumstances when a job completes after which another action is executed.
CompletionResultThe CompletionResult enumeration is a list of constant values that specify the status on completion of a job or job step.
FindOperandThe FindOperand enumeration represents a list of operands that are used to evaluate the DateJobCreated and DateJobLastModified properties to specify a range of dates in a job filter.
FrequencyRelativeIntervalsThe FrequencyRelativeIntervals enumeration contains values that are used to specify the ordinal position of a recurring occurrence within a specified period.
FrequencySubDayTypesThe FrequencySubDayTypes enumeration contains values that are used to specify the way in which scheduling is managed within the period of a day.
FrequencyTypesThe FrequencyTypes enumeration contains values that are used to specify how often a schedule is executed.
JobExecutionStatusThe JobExecutionStatus enumeration is a list of constant values that specify the execution status of a job or job step.
JobOutcomeThe JobOutcome enumeration is a list of constant values that specify the outcome after running a job.
JobServerTypeThe JobServerType enumeration is a list of constant values that specify the type of server with regard to multiserver or stand-alone administration.
JobStepFlagsThe JobStepFlags enumeration is a list of constant values that specify the file to which to append job history information.
JobTypeThe JobType enumeration is a list of constant values that specify the location where the job is run (locally or on multiple servers).
NotifyMethodsThe 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.
NotifyTypeThe NotifyType enumeration contains values that are used to specify the notification type that restricts the output of the Alert object's EnumNotifications method.
OSRunPriorityThe OSRunPriority enumeration contains constant values that specify the levels of priority given to running the operating system.
StepCompletionActionThe StepCompletionAction enumeration contains values that specify the action taken on completion of a job step.
TargetServerStatusThe 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.
WeekDaysThe WeekDays enumeration contains constant values that specify the days of the week.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft