JobServer.Alerts Property

Represents a collection of Alert objects. Each Alert object represents an alert defined on SQL Server Agent.

Namespace:  Microsoft.SqlServer.Management.Smo.Agent
Assembly:  Microsoft.SqlServer.Smo (in Microsoft.SqlServer.Smo.dll)

Syntax

'Declaration
<SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny,  _
    GetType(Alert))> _
Public ReadOnly Property Alerts As AlertCollection 
    Get
'Usage
Dim instance As JobServer 
Dim value As AlertCollection 

value = instance.Alerts
[SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny, 
    typeof(Alert))]
public AlertCollection Alerts { get; }
[SfcObjectAttribute(SfcContainerRelationship::ObjectContainer, SfcContainerCardinality::ZeroToAny, 
    typeof(Alert))]
public:
property AlertCollection^ Alerts {
    AlertCollection^ get ();
}
[<SfcObjectAttribute(SfcContainerRelationship.ObjectContainer, SfcContainerCardinality.ZeroToAny, 
    typeof(Alert))>]
member Alerts : AlertCollection
function get Alerts () : AlertCollection

Property Value

Type: Microsoft.SqlServer.Management.Smo.Agent.AlertCollection
An AlertCollection that represents the alerts defined on SQL Server Agent.

Examples

Scheduling Automatic Administrative Tasks in SQL Server Agent

See Also

Reference

JobServer Class

Microsoft.SqlServer.Management.Smo.Agent Namespace

Other Resources

Automated Administration Tasks (SQL Server Agent)

SQL Server Agent Stored Procedures (Transact-SQL)

sp_help_alert (Transact-SQL)