共用方式為


Severity Property

未來的 Microsoft SQL Server 發行版本將不再提供此功能。請避免在新的開發工作中使用此功能,並計劃修改目前使用此功能的應用程式。

The Severity property identifies a Microsoft SQL Server error message severity level to a SQL Server Agent alert.

語法

object
.Severity [= value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list.
  • value
    A long integer that specifies a SQL Server error message severity level. A number from 1 through 25 is a valid severity level.

Data Type

Long

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetSeverity(LPLONG pRetVal)
HRESULT SetSeverity(long NewValue)

備註

A SQL Server Agent alert is raised when a SQL Server process raises a specific error or an error of a specific severity level. Setting the Severity property of an Alert object associates an alert with a specific SQL Server error message severity level.

Setting both the Severity and MessageID properties of an Alert object attempts to associate an alert with both an error message severity level and an error message, which results in an error.

Applies To:

Alert Object

請參閱

參考

MessageID Property

說明及資訊

取得 SQL Server 2005 協助