sp_dropmessage

Description

Drops user-defined messages from sysusermessages.

Syntax

sp_dropmessage message_num [, language]

Parameters

message_num

is the message number of the message to be dropped. Message numbers must have a value of 20000 or higher.

language

is the language of the message to be dropped.

Examples

Example 1

Removes the French version of the message with the number 20002 from sysusermessages:

sp_dropmessage 20002, french

Usage

Permissions

The permission checks for sp_dropmessage differ based on your granular permissions settings.

Granular permissions enabled

With granular permissions enabled, you must be the user who created the message or the database owner, or a user with own database privilege on the current database.

Granular permissions disabled

With granular permissions disabled, you must be the user who created the message, the database owner, or a user with sa_role.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

Event

Audit option

Command or access audited

Information in extrainfo

38

exec_procedure

Execution of a procedure

  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

See also

System procedures sp_addmessage, sp_getmessage