共用方式為


Alert.LastOccurrenceDate 屬性

Gets or sets the date on which the alert was last raised.

命名空間:  Microsoft.SqlServer.Management.Smo.Agent
組件:  Microsoft.SqlServer.Smo (在 Microsoft.SqlServer.Smo.dll 中)

語法

'宣告
<SfcPropertyAttribute(SfcPropertyFlags.Standalone)> _
Public Property LastOccurrenceDate As DateTime 
    Get 
    Set
'用途
Dim instance As Alert 
Dim value As DateTime 

value = instance.LastOccurrenceDate

instance.LastOccurrenceDate = value
[SfcPropertyAttribute(SfcPropertyFlags.Standalone)]
public DateTime LastOccurrenceDate { get; set; }
[SfcPropertyAttribute(SfcPropertyFlags::Standalone)]
public:
property DateTime LastOccurrenceDate {
    DateTime get ();
    void set (DateTime value);
}
[<SfcPropertyAttribute(SfcPropertyFlags.Standalone)>]
member LastOccurrenceDate : DateTime with get, set
function get LastOccurrenceDate () : DateTime 
function set LastOccurrenceDate (value : DateTime)

屬性值

型別:System.DateTime
A DateTime system object value that specifies the date and time that the alert was last raised.

備註

SQL Server Agent maintains historical data for alerts raised and handled by SQL Server Agent. The date of last occurrence is one piece of historical information maintained.

範例

使用 SQL Server Agent 排程自動管理工作

請參閱

參考

Alert 類別

Microsoft.SqlServer.Management.Smo.Agent 命名空間

其他資源

自動化管理工作 (SQL Server Agent)

sp_add_alert (Transact-SQL)