Drops user-defined messages from sysusermessages.
sp_dropmessage message_num [, language]
is the message number of the message to be dropped. Message numbers must have a value of 20000 or higher.
is the language of the message to be dropped.
Removes the French version of the message with the number 20002 from sysusermessages:
sp_dropmessage 20002, french
The language parameter is optional. If included, only the message with the indicated message_num in the indicated language is dropped. If you do not specify a language, all messages with the indicated message_num are dropped.
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. |
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 |
|
System procedures sp_addmessage, sp_getmessage