Alert.DatabaseName Property

 

Applies To: SQL Server 2016 Preview

Gets or sets the name of the database that the alert is monitoring.

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

Syntax

[SfcPropertyAttribute(SfcPropertyFlags.None | SfcPropertyFlags.Standalone | SfcPropertyFlags.Matrix)]
public string DatabaseName { get; set; }
public:
[SfcPropertyAttribute(SfcPropertyFlags::None | SfcPropertyFlags::Standalone | SfcPropertyFlags::Matrix)]
property String^ DatabaseName {
    String^ get();
    void set(String^ value);
}
[<SfcPropertyAttribute(SfcPropertyFlags.None | SfcPropertyFlags.Standalone | SfcPropertyFlags.Matrix)>]
member DatabaseName : string with get, set
<SfcPropertyAttribute(SfcPropertyFlags.None Or SfcPropertyFlags.Standalone Or SfcPropertyFlags.Matrix)>
Public Property DatabaseName As String

Property Value

Type: System.String

A String value that specifies the name of the database that the alert is monitoring.

Remarks

This property is used to restrict the alert to monitoring events on a single database.

Examples

Legacy Code Example

Scheduling Automatic Administrative Tasks in SQL Server Agent

See Also

Alert Class
Microsoft.SqlServer.Management.Smo.Agent Namespace
Automated Administration Tasks (SQL Server Agent)
sp_add_alert (Transact-SQL)

Return to top