Oracle® OLAP Reference 10g Release 2 (10.2) Part Number B14350-01 |
|
|
View PDF |
ALL_OLAP_ALTER_SESSION
is the public synonym for V$OLAP_ALTER_SESSION
, which is a view for the OLAP$ALTER_SESSION
table. The view and table are owned by the SYS
user.
Each row of ALL_OLAP_ALTER_SESSION
identifies a role and a session initialization parameter. When a user opens a session using the OLAP API, the session is initialized using the parameters for roles granted to that user. For example, if there are rows for the OLAP_DBA
role and the SELECT_CATALOG_ROLE
, and a user has the OLAP_DBA
role, then the parameters for the OLAP_DBA
role will be set, but those for the SELECT_CATALOG_ROLE
will be ignored.
The following table describes the subprograms provided in OLAP_API_SESSION_INIT
.
Table 28-2 OLAP_API_SESSION_INIT Subprograms
Subprogram | Description |
---|---|
|
Specifies an |
|
Removes orphaned data, that is, any |
DELETE_ALTER_SESSION Procedure |
Removes a previously defined |
This procedure specifies an ALTER SESSION
parameter for OLAP API users with a particular database role. It adds a row to the OLAP$ALTER_SESSION
table.
Syntax
ADD_ALTER_SESSION ( role_name IN VARCHAR2, session_parameter IN VARCHAR2);
Parameters
The role_name
and session_parameter
are added as a row in OLAP$ALTER_SESSION
.
Table 28-3 ADD_ALTER_SESSION Procedure Parameters
Parameter | Description |
---|---|
|
The name of a valid role in the database. Required. |
|
A parameter that can be set with a SQL |
Example
The following call inserts a row in OLAP$ALTER_SESSION
that turns on query rewrite for users with the OLAP_DBA
role.
call olap_api_session_init.add_alter_session( 'OLAP_DBA', 'SET QUERY_REWRITE_ENABLED=TRUE');
The ALL_OLAP_ALTER_SESSION
view now contains the following row.
ROLE CLAUSE TEST ----------------- ---------------------------------------------------- OLAP_DBA ALTER SESSION SET QUERY_REWRITE_ENABLED=TRUE
This procedure removes all ALTER SESSION
parameters for any role that is not currently defined in the database. It removes all orphaned rows in the OLAP$ALTER_SESSION
table for those roles.
Syntax
CLEAN_ALTER_SESSION ();
Examples
The following call deletes all orphaned rows.
call olap_api_session_init.clean_alter_session();
This procedure removes a previously defined ALTER SESSION
parameter for OLAP API users with a particular database role. It deletes a row from the OLAP$ALTER_SESSION
table.
Syntax
DELETE_ALTER_SESSION ( role_name IN VARCHAR2, session_parameter IN VARCHAR2);
Parameters
The role_name
and session_parameter
together uniquely identify a row in OLAP$ALTER_SESSION
.
Table 28-4 DELETE_ALTER_SESSION Procedure Parameters
Parameter | Description |
---|---|
role_name |
The name of a valid role in the database. Required. |
session_parameter |
A parameter that can be set with a SQL |
Examples
The following call deletes a row in OLAP$ALTER_SESSION
that contains a value of OLAP_DBA
in the first column and QUERY_REWRITE_ENABLED=TRUE
in the second column.
call olap_api_session_init.delete_alter_session( 'OLAP_DBA', 'SET QUERY_REWRITE_ENABLED=TRUE');