Skip Headers
Oracle® OLAP Reference
10g Release 2 (10.2)

Part Number B14350-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

Directing Output

The CWM2_OLAP_MANAGER package, described in Chapter 17, provides procedures that direct the output of OLAP stored procedures to the screen or to a file. You can use these procedures to help you develop and debug your scripts for working with OLAP Catalog metadata and analytic workspaces.

Before calling any of the CWM2_OLAP_MANAGER procedures, you must set the serveroutput option in SQL*Plus. This causes SQL*Plus to display the contents of the SQL buffer. For more information, see SQL*Plus User's Guide and Reference.

>set serveroutput on

The default and minimum size of the SQL buffer is 2K. You can extend the size up to a maximum of 1MG. In general, you should set serveroutput to its maximum size to prevent buffer overflow conditions.

SQL>set serveroutput on size 1000000

To echo the output and messages from OLAP procedures to the SQL buffer, use the following statement.

>exec cwm2_olap_manager.set_echo_on;

By default, echoing is turned off. Once you have set echoing on, you can turn it off with the following statement.

>exec cwm2_olap_manager.set_echo_off;

To accommodate larger amounts of output, you should direct output to a file. Use the following statement.

SQL>exec cwm2_olap_manager.begin_log('directory_path','filename');

For directory_path you can specify either a directory object to which your user ID has been granted the appropriate access (in upper-case), or a directory path set by the UTL_FILE_DIR initialization parameter for the instance.

To flush the contents of the buffer and turn off logging, use the following statement.

SQL>exec cwm2_olap_manager.end_log;