Oracle9i OLAP User's Guide Release 2 (9.2.0.2) Part Number A95295-02 |
|
|
View PDF |
The procedures in the OLAP Data Management package, DBMS_ODM
, generate scripts that create materialized views in grouping set form for fact tables. Each script generates a single MV containing all hierarchy combinations for a CWM2
cube.
The procedures in DBMS_ODM
generate scripts that create materialized views, bitmap indexes, and partitions. You can run these scripts in their original form, modify the scripts before executing them, or use them simply as models for writing your own SQL scripts.
Follow these steps to create a grouping set materialized view for a cube:
CWM2
cube as described in Chapter 17, "CWM2_OLAP_CUBE".UTL_FILE_DIR
parameter to a valid directory, as described in "Initialization Parameters for Oracle OLAP".DBMS_ODM.CREATEDIMLEVTUPLE
to create the table sys.olaptablevels
. This table lists all the dimensions of the cube and all of the levels of each dimension.
By default, all the levels of all the dimensions are selected for inclusion in the materialized view. You can edit the table to deselect any levels that you do not want to include.
DBMS_ODM.CREATECUBELEVELTUPLE
to create the table sys.olaptableveltuples
. This table lists all of the level combinations that will be included in the materialized view. This table is derived from the table created in the previous step.
By default, all the levels combinations are selected for inclusion in the materialized view. You can edit the table to deselect any level combinations that you do not want to include.
DBMS_ODM.CREATEFACTMV_GS
to create the script.For example, in the Sales History sample schema, you would create a script for COST_CUBE
and a script for SALES_CUBE
.
@/users/oracle/OraHome1/olap/mvscript.sql;
See Also:
"Summary of DBMS_ODM Subprograms" for the syntax of the procedures in the |