A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  special characters  sybase-tech-blog


Category: ASE: Functions: Security Functions

list_appcontext()

The Security Function list_appcontext() returns a list of attributes of a context passed with the parameter "context_name". If the parameter "context_name" is not set, all attributes of all contexts are listed. list_appcontext() is a so-called built-in function, provided by the Application Context Facility (ACF). It can only be executed by users with corresponding privileges. Users who execute this function without having been granted the correct privileges will be presented with an error message in connection with the return value "-1". Users with the right privileges receive a return value of "0" or the "application context attribute name".

Syntax of the Security Function list_appcontext()

    list_appcontext(["context_name"])
    

The parameter of the Security Function list_appcontext()

context_name
The parameter "context_name" is an optional placeholder for all "application context attributes".

Example for the Security Function list_appcontext()

    select list_appcontext("context_name_1")
go
-----
Context Name: (context_name_1)
Attribute Name: (attribute_name_1) Value: (attribute_value_1)
Context Name: (context_name_1)
Attribute Name: (attribute_name_2) Value: (attribute_value_2)

Returns a list of attributes for on or more contexts.

    select list_appcontext("context_name_1")
go
Select permission denied on built-in list_appcontext, database dbid
-----
-1

In this example the user is lacking privileges to execute the function. Thus an error message is returned containing the value"-1".

See also:

ASE T-SQL - Aggregate Functions,
get_appcontext(),
is_sec_service_on(),
rm_appcontext(),
Security Functions,
set_appcontext(),
show_sec_services().