Removes a specific application context, or all application contexts. rm_appcontext is provided by the Application Context Facility (ACF).
rm_appcontext(“context_name”, “attribute_name”)
select rm_appcontext("CONTEXT1", "*")
---------- 0
select rm_appcontext("*", "*")
--------- 0
select rm_appcontext("NON_EXISTING_CTX","ATTR")
--------- -1
select rm_appcontext("CONTEXT1","ATTR2")
----------
-1
This function always returns 0 for success.
All the arguments for this function are required.
For more information on the ACF see Row-Level Access Control in System Administration Guide.
ANSI SQL – Compliance level: Transact-SQL extension.
The permission checks for rm_appcontext differ based on your granular permissions settings.
Granular Permissions | Description |
---|---|
Enabled | With granular permissions enabled, you must have select permission on rm_appcontext to execute the function. |
Disabled | With granular permissions disabled, you must be a user with sa_role, or have select permission on rm_appcontext to execute the function. |