Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Microsoft.SqlServer.Management.Smo.Agent Namespace

 

Applies To: SQL Server 2016 Preview

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

ClassDescription
System_CAPS_pubclassAgentObjectBase

The AgentObjectBase class is a base class that is inherited by all the SQL Server Agent classes and contains common members.

System_CAPS_pubclassAlert

The Alert class represents a Microsoft SQL Server Agent alert.

System_CAPS_pubclassAlertCategory

The AlertCategory class contains attributes that allow alerts to be categorized.

System_CAPS_pubclassAlertCategoryCollection

The AlertCategoryCollection class represents a collection of AlertCategory objects that represent all the categories defined on the parent object.

System_CAPS_pubclassAlertCollection

The AlertCollection class represents a collection of Alert objects that represent all the alerts defined on the parent object.

System_CAPS_pubclassAlertSystem

The AlertSystem class contains system information pertaining to all alerts defined on the instance of Microsoft SQL Server.

System_CAPS_pubclassCategoryBase

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.

System_CAPS_pubclassJob

The Job class represents a Microsoft SQL Server Agent job.

System_CAPS_pubclassJobCategory

The JobCategory class contains attributes that allow alerts to be categorized.

System_CAPS_pubclassJobCategoryCollection

The JobCategoryCollection class represents a collection of JobCategory objects that represent all the categories defined on the parent object.

System_CAPS_pubclassJobCollection

The JobCollection class represents a collection of Job objects that represent all the jobs defined on the JobServer object.

System_CAPS_pubclassJobFilter

The JobFilter object is used to store information about the constraints applied to the EnumJobs method of the JobServer object.

System_CAPS_pubclassJobHistoryFilter

The JobHistoryFilter object is used to store information about the constraints applied to the EnumJobHistory method of the JobServer object.

System_CAPS_pubclassJobSchedule

The JobSchedule class represents a SQL Server Agent job schedule.

System_CAPS_pubclassJobScheduleCollection

The JobScheduleCollection class represents a collection of JobSchedule objects that represent all the job schedules defined on the parent object.

System_CAPS_pubclassJobServer

The JobServer object represents the SQL Server Agent subsystem and the msdb database.

System_CAPS_pubclassJobStep

The JobStep class represents a Microsoft SQL Server job step.

System_CAPS_pubclassJobStepCollection

The JobStepCollection class represents a collection of JobStep objects that represent all the job steps defined on the parent Job object.

System_CAPS_pubclassOperator

The Operator class represents a SQL Server Agent operator.

System_CAPS_pubclassOperatorCategory

The OperatorCategory class contains attributes that allow operators to be categorized.

System_CAPS_pubclassOperatorCategoryCollection

The OperatorCategoryCollection class represents a collection of OperatorCategory objects that represent all the categories defined on the parent object.

System_CAPS_pubclassOperatorCollection

The OperatorCollection class represents a collection of Operator objects that represent all the operators defined on the JobServer object.

System_CAPS_pubclassProxyAccount

The ProxyAccount class represents a SQL Server Agent proxy account.

System_CAPS_pubclassProxyAccountCollection

The ProxyAccountCollection class represents a collection of ProxyAccount objects that represent all the proxy accounts defined on SQL Server Agent.

System_CAPS_pubclassScheduleBase

The ScheduleBase class is a base class that is inherited by the JobSchedule class.

System_CAPS_pubclassTargetServer

The TargetServer object represents a target server defined for multiserver administration on SQL Server Agent.

System_CAPS_pubclassTargetServerCollection

The TargetServerCollection class represents a collection of TargetServer objects that represent all the target servers defined on SQL Server Agent.

System_CAPS_pubclassTargetServerGroup

The TargetServerGroup object that represent a target server group defined for multi-server administration on SQL Server Agent.

System_CAPS_pubclassTargetServerGroupCollection

The TargetServerGroupCollection class represents a collection of TargetServerGroup objects that represent all the target server groups defined on SQL Server Agent.

EnumerationDescription
System_CAPS_pubenumActivationOrder

The ActivationOrder enumeration contains values that are used to specify when the trigger runs in relation to other triggers attached to a given the insert, update, or delete operation.

System_CAPS_pubenumAgentLogLevels

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.

System_CAPS_pubenumAgentMailType

The AgentMailType enumeration contains values that are used to specify the source of mail.

System_CAPS_pubenumAgentSubSystem

The AgentSubSystem enumeration contains values that are used to specify the Microsoft SQL Server subsystems that can be used by job steps.

System_CAPS_pubenumAlertType

The AlertType enumeration contains values that are used to specify the type of event or performance condition that causes alerts to be raised.

System_CAPS_pubenumCategoryType

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.

System_CAPS_pubenumCompletionAction

The CompletionAction enumeration is a list of constant values that specify the circumstances when a job completes after which another action is executed.

System_CAPS_pubenumCompletionResult

The CompletionResult enumeration is a list of constant values that specify the status on completion of a job or job step.

System_CAPS_pubenumFindOperand

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

System_CAPS_pubenumFrequencyRelativeIntervals

The FrequencyRelativeIntervals enumeration contains values that are used to specify the ordinal position of a recurring occurrence within a specified period.

System_CAPS_pubenumFrequencySubDayTypes

The FrequencySubDayTypes enumeration contains values that are used to specify the way in which scheduling is managed within the period of a day.

System_CAPS_pubenumFrequencyTypes

The FrequencyTypes enumeration contains values that are used to specify how often a schedule is executed.

System_CAPS_pubenumJobExecutionStatus

The JobExecutionStatus enumeration is a list of constant values that specify the execution status of a job or job step.

System_CAPS_pubenumJobOutcome

The JobOutcome enumeration is a list of constant values that specify the outcome after running a job.

System_CAPS_pubenumJobServerType

The JobServerType enumeration is a list of constant values that specify the type of server with regard to multiserver or stand-alone administration.

System_CAPS_pubenumJobStepFlags

The JobStepFlags enumeration is a list of constant values that specify the file to which to append job history information.

System_CAPS_pubenumJobType

The JobType enumeration is a list of constant values that specify the location where the job is run (locally or on multiple servers).

System_CAPS_pubenumMonthlyRelativeWeekDays

The MonthlyRelativeWeekDays enumeration contains values that specify the days of the week, weekdays, weekends, or every day.

System_CAPS_pubenumNotifyMethods

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.

System_CAPS_pubenumNotifyType

The NotifyType enumeration contains values that are used to specify the notification type that restricts the output of the Alert object's EnumNotifications method.

System_CAPS_pubenumOSRunPriority

The OSRunPriority enumeration contains constant values that specify the levels of priority given to running the operating system.

System_CAPS_pubenumStepCompletionAction

The StepCompletionAction enumeration contains values that specify the action taken on completion of a job step.

System_CAPS_pubenumTargetServerStatus

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.

System_CAPS_pubenumWeekDays

The WeekDays enumeration contains constant values that specify the days of the week.

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.

Return to top

Community Additions

Show:
© 2015 Microsoft