Share via


MessageID Property

この機能は、将来のバージョンの Microsoft SQL Server では削除される予定です。新規の開発作業ではこの機能を使用しないようにし、現在この機能を使用しているアプリケーションは修正することを検討してください。

The MessageID property identifies a Microsoft SQL Server message to a SQL Server Agent alert.

構文

object
.MessageID [= value]

Parts

  • object
    An expression that evaluates to an object in the Applies To list
  • value
    A long integer identifier of a SQL Server system message

Data Type

Long

Modifiable

Read/write

Prototype (C/C++)

HRESULT GetMessageID(LPLONG pRetVal);
HRESULT SetMessageID(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. Setting the MessageID property of an Alert object associates an alert with a specific SQL Server system error message.

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

SQL Server Agent alerts based on the MessageID property can be restricted to a specific database. Use the MessageID and DatabaseName properties of the Alert object to restrict alert activation.

Multiple alerts can be defined for a single error message, but each alert defined on the error message must be restricted to a specific database.

Applies To:

Alert Object

 

参照

関連項目

DatabaseName Property
Severity Property

ヘルプおよび情報

SQL Server 2005 の参考資料の入手