sp_unbindmsg

Unbinds a user-defined message from a constraint.

Syntax

sp_unbindmsg constrname

Parameters

Examples

Usage

You can bind only one message to a constraint. To change the message bound to a constraint, use sp_bindmsg; the new message number replaces any existing bound message. It is not necessary to use sp_unbindmsg first.

To retrieve message text from the sysusermessages table, execute sp_getmessage.

Permissions

You must be the constraint owner to execute sp_unbindmsg. Permission checks do not differ based on the granular permissions settings.

Auditing

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

InformationValues
Event

38

Audit option

exec_procedure

Command or access audited

Execution of a procedure

Information in extrainfo
  • 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

InformationValues
Event

69

Audit option

unbind

Command or access audited

sp_unbindmsg

Information in extrainfo
  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – NULL

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

Related reference
sp_addmessage
sp_bindmsg
sp_getmessage