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: