Unbinds a user-defined message from a constraint.
sp_unbindmsg constrname
is the name of the constraint from which a message is to be unbound.
Unbinds a user-defined message from the constraint positive_balance:
sp_unbindmsg positive_balance
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.
You must be the constraint owner to execute sp_unbindmsg. Permission checks do not differ based on the granular permissions settings.
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 |
|
69 |
unbind |
sp_unbindmsg |
|
System procedures sp_addmessage, sp_bindmsg, sp_getmessage