Removes the execution class attribute previously associated with an client application, login, stored procedure, or default execution class for the specified scope.
sp_unbindexeclass object_name, object_type, scope
is the name of the application, login, or stored procedure for which you remove the association to the execution class. If the object_type is DF, object_name should be null.
identifies the type of object_name as AP, LG, PR , or DF for application, login, stored procedure, or default execution class.
is the application name or login name for which the unbinding applies for an application or login. It is the stored procedure owner name (user name) for stored procedures. It is null for object type DF.
Removes the association between “sa” login scoped to application isql and an execution class. “sa” automatically binds itself to another execution class, depending on other binding specifications, precedence, and scoping rules. If no other binding is applicable, the object binds to the default execution class, EC2:
sp_unbindexeclass 'sa', 'lg', 'isql'
The parameters must match an existing entry in the sysattributes system table.
If you specify a null value for scope, Adaptive Server unbinds the object for which the scope is null, if there is one.
A null value for scope does not indicate that unbinding should apply to all bound objects.
When unbinding a stored procedure from an execution class, you must use the name of the stored procedure owner (user name) for the scope parameter.
When unbinding a stored procedure from a user-defined default execution class, all tasks running with user-defined default execution class attributions run with attributes of system-defined default execution class EC2.
Stored procedures can be dropped before or after unbinding.
A user cannot be dropped from a database if the user owns a stored procedure that is bound to an execution class in that database.
Unbind objects of type PR before dropping them from the database.
Unbinding will fail if the associated engine group has no online engines and active processes are bound to the associated execution class.
Due to precedence and scoping rules, the execution class being unbound may or may not have been in effect for the object_name. The object automatically binds itself to another execution class, depending on other binding specifications and precedence and scoping rules. If no other binding is applicable, the object binds to the default execution class. If there is no use-defined default execution class, the object binds to class EC2.
Only a system administrator can execute sp_unbindexeclass.
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_addexeclass, sp_bindexeclass, sp_dropexeclass, sp_showexeclass