Oracle® OLAP DML Reference 11g Release 2 (11.2) E17122-08 |
|
|
PDF · Mobi · ePub |
The RUN
procedure executes one or more OLAP DML commands and directs the output to a printer buffer. It is typically used to manipulate analytic workspace data within an interactive SQL session. In contrast to the EXECUTE Procedure, RUN
stops processing commands when it gets an error.
When you are using SQL*Plus, you can direct the printer buffer to the screen by issuing the following command:
SET SERVEROUT ON
If you are using a different program, refer to its documentation for the equivalent setting.
This procedure does not print the output of the DML commands when you have redirected the output by using the OLAP DML OUTFILE
command.
Note:
You cannot execute this procedure from within the OLAP Worksheet. You must execute if in a SQL tool such as SQL*Plus.RUN ( olap_commands IN STRING, silent IN BOOLEAN DEFAULT FALSE); RUN ( olap_commands IN CLOB, silent IN BOOLEAN DEFAULT FALSE); RUN ( olap_commands IN STRING, output OUT STRING); RUN ( olap_commands IN STRING, output IN OUT CLOB); RUN ( olap_commands IN CLOB, output OUT STRING); RUN ( olap_commands IN CLOB, output IN OUT CLOB);
Table B-28 EXECUTE Procedure Parameters
Parameter | Description |
---|---|
|
One or more OLAP DML commands separated by semicolons. See "Guidelines for Using Quotation Marks in OLAP DML Commands". |
|
A boolean value that signals whether the output from the OLAP DML commands should be suppressed. (Error messages from the OLAP engine are never suppressed, regardless of this setting.) |
|
Output from the OLAP engine in response to the OLAP commands. |
The following sample SQL*Plus session attaches an analytic workspace named XADEMO
, creates a formula named COST_PP
in XADEMO
, and displays the new formula definition.
EXECUTE dbms_aw.run('DESCRIBE time');
DEFINE TIME DIMENSION TEXT
The next example shows how RUN
stops executing commands after encountering an error.
EXECUTE dbms_aw.run('SHOW DECIMALS'); 0 EXECUTE dbms_aw.run('CALL nothing; DECIMALS=4'); BEGIN dbms_aw.run('CALL nothing; DECIMALS=4'); END; * ERROR at line 1: ORA-34492: Analytic workspace object NOTHING does not exist. ORA-06512: at "SYS.DBMS_AW", line 58 ORA-06512: at "SYS.DBMS_AW", line 134 ORA-06512: at line 1 EXECUTE dbms_aw.run('SHOW DECIMALS'); 0