Learn about session variables and how to create them.
This section provides information about working with session variables, and contains the following topics:
Session variables obtain their values from initialization blocks.
Unlike dynamic repository variables, however, the initialization of session variables is not scheduled. When a user begins a session, the Oracle BI Server creates new instances of session variables and initializes them.
Unlike a repository variable, there are as many instances of a session variable as there are active sessions on the Oracle BI Server. Each instance of a session variable could be initialized to a different value.
Session variables are primarily used when authenticating users against external sources such as database tables or LDAP servers. If a user is authenticated successfully, session variables can be used to set filters and permissions for that session. When using session variables to set up security, see Managing Session Variables in Security Guide for Oracle Business Intelligence Enterprise Edition.
This section contains the following topics:
System session variables are used by the Oracle BI Server and Oracle BI Presentation Services use for specific purposes.
System session variables have reserved names that cannot be used for other kinds of variables such as static or dynamic repository variables and non-system session variables.
When you use these variables for Oracle BI Presentation Services, preface their names with NQ_SESSION
. For example, to filter a column on the value of the variable LOGLEVEL
, set the filter to the variable NQ_SESSION.LOGLEVEL
.
The table describes the available system session variables.
Variable | Description |
---|---|
USER |
Holds the value the user enters. The |
USERGUID |
Contains the global unique identifier (GUID) of the user, populated from the LDAP or other profile for the user. |
GROUP |
Contains the groups that the user belongs. Group exists only for compatibility with previous releases. Legacy groups are mapped to application roles automatically. When a user belongs to multiple groups, include the group names in the same column, separated by semicolons, for example, GroupA;GroupB;GroupC. If you must use a semicolon as part of a group name, precede the semicolon with a backslash character (\). |
ROLES |
Contains the application roles that the user belongs. When a user belongs to multiple roles, include the role names in the same column, separated by semicolons, for example, RoleA;RoleB;RoleC. If a semicolon must be included as part of a role name, precede the semicolon with a backslash character (\). |
ROLEGUIDS |
Contains the global unique identifiers (GUIDs) for the application roles to which the user belongs. GUIDs for application roles are the same as the application role names. |
PERMISSIONS |
Contains the permissions held by the user such as oracle.bi.server.manageRepositories. |
PROXY |
Holds the name of the proxy user is authorized to act for another user. See Security Guide for Oracle Business Intelligence Enterprise Edition for more information about the PROXY system session variable. |
DISPLAYNAME |
Used for Oracle BI Server. It contains the name that is displayed to the user in the greeting in the Oracle BI Presentation Services user interface. It is also saved as the author field for catalog objects. |
LOGLEVEL |
The
|
DESCRIPTION |
Contains a description of the user as populated from the LDAP or other user profile. |
USERLOCALE |
Contains the locale of the user as populated from the LDAP or other user profile. |
DISABLE_CACHE_HIT |
Used to enable or disable Oracle BI Server result cache hits. This variable has a possible value of 0 or 1. |
DISABLE_CACHE_SEED |
Used to enable or disable Oracle BI Server result cache seeding. This variable has a possible value of 0 or 1. |
DISABLE_SUBREQUEST_CACHE |
Used to enable or disable Oracle BI Server subrequest cache hits and seeding. This variable has a possible value of 0 or 1. |
SELECT_PHYSICAL |
Identifies the query as a |
DISABLE_PLAN_CACHE_HIT |
Used to enable or disable Oracle BI Server plan cache hits. This variable has a possible value of 0 or 1. |
DISABLE_PLAN_CACHE_SEED |
Used to enable or disable Oracle BI Server plan cache seeding. This variable has a possible value of 0 or 1. |
TIMEZONE |
Contains the time zone of the user as populated from the LDAP or other user profile. |
WEBLANGUAGE |
Used for Oracle BI Presentation Services. Holds the Oracle BI Presentation Services user interface display language. Users can select a language on the sign-in page for Oracle BI EE, or they can change the language setting on the Preferences tab of the My Account dialog after signing in. |
AUTHINITBLOCKONLY |
Determines if the initialization blocks required for authentication are executed. This variable has a value of Yes. The value is case-insensitive. |
PORTALPATH |
Used for Oracle BI Server. It identifies the default dashboard the user sees when logging in, the user can override this preference after signing onto Oracle BI EE. |
REQUESTKEY |
Used for Oracle BI Presentation Services. Any users with the same nonblank request key share the same Oracle BI Presentation Services cache entries. This tells Oracle BI Presentation Services that these users have identical content filters and security in the Oracle BI Presentation Services. Sharing Oracle BI Presentation Services cache entries is a way to minimize unnecessary communication with the Oracle BI Presentation Services. |
SKIN |
Determines certain elements of the look and feel of the Oracle BI Presentation Services user interface. The user can alter some elements of the user interface by picking a style when logged on to Oracle BI Presentation Services. The |
You use the same procedure to define nonsystem session variables as for system session variables.
A common use for nonsystem session variables is setting user filters. For example, you could define a nonsystem variable called SalesRegion that would be initialized to the name of the sales region of the user.
You could then set a security filter for all members of a group that would allow them to view only data pertinent to their region.
When you use these variables for Oracle BI Server, preface their names with NQ_SESSION
. For example, to filter a column on the value of the variable SalesRegion
, set the filter to the variable NQ_SESSION.SalesRegion
.
Use these steps to create session variables.
Create unique names for all variables. The names of system session variables are reserved. You cannot use system session variable names for other types of variables.
The Enable any user to set the value option lets non-administrators set the variable for sampling.
The NQSSetSessionValues()
stored procedure is not supported for use through the Issue SQL page in Oracle BI Presentation Services Administration. You must select the Enable any user to set the value option to set a value for the variable.
When Security Sensitive is selected, the Oracle BI Server, the looks at the parent database object of each column or table that is referenced in the logical request projection list. If the database object has the Virtual Private Database option selected, the Oracle BI Server matches a list of security-sensitive variables to each prospective cache hit. Cache hits would only occur on cache entries that included and matched all security-sensitive variables.
If you are creating a session variable to override a hierarchy column's selection steps, then you must choose an initialization block with its initialization string written in JSON syntax. See Initialization Strings Used in Variables to Override Selection Steps and Creating Initialization Blocks.
NQSSetSessionValue()
.