Oracle® OLAP DML Reference 11g Release 1 (11.1) Part Number B28126-01 |
|
|
View PDF |
The OLAP_RUNNING
function returns a boolean indicating whether or not the OLAP option has been initialized in the current session. Initialization occurs when you execute an OLAP DML command (either directly or by using an OLAP PL/SQL or Java package), query an analytic workspace, or execute the STARTUP Procedure.
Note:
You cannot execute this function from within the OLAP Worksheet. You must execute if in a SQL tool such as SQL*Plus.Syntax
OLAP_RUNNING( ) RETURN BOOLEAN;
Returns
TRUE
if OLAP has been initialized in the current session, or FALSE
if it has not.
Example
The following PL/SQL script tests whether the OLAP environment has been initialized, and starts it if not.
BEGIN IF DBMS_AW.OLAP_RUNNING() THEN DBMS_OUTPUT.PUT_LINE('OLAP is already running'); ELSE DBMS_AW.STARTUP; IF DBMS_AW.OLAP_RUNNING() THEN DBMS_OUTPUT.PUT_LINE('OLAP started successfully'); ELSE DBMS_OUTPUT.PUT_LINE('OLAP did not start. Is it installed?'); END IF; END IF; END; /