list_appcontext

Description

Lists all the attributes of all the contexts in the current session. list_appcontext is provided by the ACF.

Syntax

list_appcontext(["context_name"])

Parameters

context_name

is an optional argument that names all the application context attributes in the session.

Examples

Example 1

Shows the results when a user with appropriate permissions attempts to list the application contexts:

select list_appcontext ([context_name])
Context Name: (CONTEXT1)
Attribute Name: (ATTR1) Value: (VALUE2)
Context Name: (CONTEXT2)
Attribute Name: (ATTR1) Value: (VALUE1)

Example 2

Shows the results when a user without appropriate permissions attempts to list the application contexts:

select list_appcontext()
Select permission denied on built-in list_appcontext, database DBID
--------
-1

Usage

Standards

ANSI SQL – Compliance level: Transact-SQL extension

Permissions

The permission checks for list_appcontext differ based on your granular permissions settings.

Granular permissions enabled

With granular permissions enabled, you must have select permission on list_appcontext to execute the function.

Granular permissions disabled

With granular permissions disabled, you must have select permission on list_appcontext or be a user with sa_role to execute the function.

See also

For more information on the ACF, see “Row-level access control” in Chapter 11, “Managing User Permissions” of the System Administration Guide.

Functions get_appcontext, list_appcontext, rm_appcontext, set_appcontext