Unbinds a user-defined message from a constraint.
sp_unbindmsg constrname
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:
Information | Values |
---|---|
Event | 38 |
Audit option | exec_procedure |
Command or access audited | Execution of a procedure |
Information in extrainfo |
|
Information | Values |
---|---|
Event | 69 |
Audit option | unbind |
Command or access audited | sp_unbindmsg |
Information in extrainfo |
|