Unbinds a rule from a column or from a user-defined datatype.
sp_unbindrule objname [, futureonly [, “accessrule” | “all”]]
sp_unbindrule "employees.startdate"
sp_unbindrule def_ssn
sp_unbindrule ssn, futureonly
sp_unbindrule publishers, null, "all"
sp_unbindrule def_ssn, futureonly, "accessrule"
sp_unbindrule def_ssn, futureonly, "all"
sp_bindrule empl_access, "publishers.pub_id"To unbind this rule, issue:
sp_unbindrule "empl_access", NULL, "accessrule"
Executing sp_unbindrule removes a rule from a column or from a user-defined datatype in the current database. If you do not want to unbind the rule from existing objname columns, use futureonly as the second parameter.
You cannot use sp_unbindrule to unbind a check constraint. Use alter table to drop the constraint.
To unbind a rule from a table column, specify the objname argument in the form “table.column”.
The rule is unbound from all existing columns of the user-defined datatype unless the rule has been changed or the value of the optional second parameter is futureonly.
To display the text of a rule, execute sp_helptext with the rule name as the parameter.
See also create rule, drop rule in Reference Manual: Commands.
You must be the table owner or datatype owner to execute sp_unbindrule. 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 |
|