Dbms_awm.refresh_awcube

Hi Everybody,
OWB 10.1.0.4 / RDBMS 10.2.0.4 on Linux x86-64
1. executing the following command form SQLPLUS gave the following Error
SQL> exec dbms_awm.refresh_awcube('DW_OLAP', 'EK', 'EK_FACT_O_EK_STAN_DOK', 'FACT_O_EK_STAN_DOK')
BEGIN dbms_awm.refresh_awcube('DW_OLAP', 'EK', 'EK_FACT_O_EK_STAN_DOK', 'FACT_O_EK_STAN_DOK'); END;
ERROR in line 1:
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "OLAPSYS.DBMS_AWM", line 1253
ORA-06512: at line 1
2. OLPA options are installed in the DB and Valid
best regards,
Ashraf Hussein

I am also facing the same issue. I am using Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production with OLAP enabled on it.
Any help on this issue will be useful.
Thanks.
Narayanan.

Similar Messages

  • OWB 9.0.4: dbms_awm.refresh_awcube  ORA-06501: PL/SQL: program error

    While running the following PL/SQL generated by OWB/OLAP bridge using OWB 9.0.4, I get the PL/SQL program error
    PL/SQL:
    begin
    dbms_awm.create_awcube (USER, 'BIBDEMO_STKPRICE_CUBE', USER, 'BIBDEMO_AW', 'AW_BIBDEMO_STKPRICE_CUBE');
    begin
    dbms_awm.create_awcubeload_spec ('BIBDEMO_STKPRICE_CUBE', USER, 'BIBDEMO_STKPRICE_CUBE', 'LOAD_DATA');
    exception when others then null;
    end;
    dbms_awm.refresh_awcube (USER, 'BIBDEMO_AW', 'AW_BIBDEMO_STKPRICE_CUBE', 'BIBDEMO_STKPRICE_CUBE');
    exception when others then cwm_utility.dump_error(); raise program_error;
    end;
    ERROR:
    ERROR at line 1:
    ORA-06501: PL/SQL: program error
    ORA-06512: at line 4
    ORA-06510: PL/SQL: unhandled user-defined exception
    fyi: I am using Oracle9i with 9.2.0.3 patch
    The DBMS_AW statement to create/populate the dimesntions works fine
    Here is the PL/SQL for the dimensions
    begin
    dbms_awm.create_awdimension (USER, 'STOCK', USER, 'BIBDEMO_AW', 'AW_STOCK');
    begin
    dbms_awm.create_awdimload_spec ('STOCK', USER, 'STOCK', 'FULL_LOAD');
    exception when others then null;
    end;
    dbms_awm.refresh_awdimension (USER, 'BIBDEMO_AW', 'AW_STOCK', 'STOCK');
    dbms_awm.create_awdimension (USER, 'DAY', USER, 'BIBDEMO_AW', 'AW_DAY');
    begin
    dbms_awm.create_awdimload_spec ('DAY', USER, 'DAY', 'FULL_LOAD');
    exception when others then null;
    end;
    dbms_awm.refresh_awdimension (USER, 'BIBDEMO_AW', 'AW_DAY', 'DAY');
    dbms_awm.create_awdimension (USER, 'STKMEAS', USER, 'BIBDEMO_AW', 'AW_STKMEAS');
    begin
    dbms_awm.create_awdimload_spec ('STKMEAS', USER, 'STKMEAS', 'FULL_LOAD');
    exception when others then null;
    end;
    dbms_awm.refresh_awdimension (USER, 'BIBDEMO_AW', 'AW_STKMEAS', 'STKMEAS');
    exception when others then cwm_utility.dump_error(); raise program_error;
    end;
    I am just trying the recreate the BIBDEMO_STKPRICE_CUBE in analytical workspace. Would be helpful if someone could send me the complete PL/SQL for creating the analytical workspace and views for this cube using DBMS_AW package.
    Thanks
    Panneer

    Panneer,
    Unfortunately you will need a patch on top of database version 9.2.0.3 in order to make this functionality work. This patch has not been released yet, but is currently in QA. We are hoping that the patch will be available in June. Stay tuned...
    Thanks,
    Mark.

  • Dbms_awm.refresh_awcube Error

    Hello Everybody
    OWB 10.1.0.4 / RDBMS 10.2.0.4 on Linux x86-64
    1. executing the following command form SQLPLUS gave the following Error
    SQL> exec dbms_awm.refresh_awcube('DW_OLAP', 'EK', 'EK_FACT_O_EK_STAN_DOK', 'FACT_O_EK_STAN_DOK')
    BEGIN dbms_awm.refresh_awcube('DW_OLAP', 'EK', 'EK_FACT_O_EK_STAN_DOK', 'FACT_O_EK_STAN_DOK'); END;
    ERROR in line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "OLAPSYS.DBMS_AWM", line 1253
    ORA-06512: at line 1
    2. OLPA options are installed in the DB and Valid
    Any Hints
    best regards,

    Panneer,
    Unfortunately you will need a patch on top of database version 9.2.0.3 in order to make this functionality work. This patch has not been released yet, but is currently in QA. We are hoping that the patch will be available in June. Stay tuned...
    Thanks,
    Mark.

  • Performance Problem while Aggregation

    Performance problem while aggrgating
    These r my dimension and cube i wrote customized Aggrgation map and i m aggragating all dimension (except for last level a unique one (PK) + cube .
    My system config is good ..
    But Aggrgation deployment (calculation ) is really really very slow compared to other vendors product
    i.e. It took me 3 hours to aggrgate all dimension (all levels except last) and cube (only containing 1000 rows to check and deleted all others rows)
    Dimensions Number of rows
    dim_product 156,0
    t_time 730
    dim_promotion 186,4
    dim_store 25
    dim_distributor 102,81
    Cube Number of Row
    Cube_SalesFact 300,000
    Plz solve my problem coz if it take that much time then i must say the performance of software is not that good where it should be....
    and i must suggest oracle to do some thing about this serious problem
    Thanks
    Well wisher of Oracle Corporation

    BEGIN
    cwm2_olap_manager.set_echo_on;
    CWM2_OLAP_MANAGER.BEGIN_LOG('D:\', 'AggMap_CubeSalesfact.log');
    DBMS_AW.EXECUTE('aw attach RTTARGET.AW_WH_SALES RW' );
    BEGIN
    DBMS_AWM.DELETE_AWDIMLOAD_SPEC('DIM_DISTRIBUTOR', 'RTTARGET', 'DIM_DISTRIBUTOR');
    DBMS_AWM.DELETE_AWDIMLOAD_SPEC('DIM_PRODUCT', 'RTTARGET', 'DIM_PRODUCT');
    DBMS_AWM.DELETE_AWDIMLOAD_SPEC('DIM_PROMOTION', 'RTTARGET', 'DIM_PROMOTION');
    DBMS_AWM.DELETE_AWDIMLOAD_SPEC('DIM_STORE', 'RTTARGET', 'DIM_STORE');
    DBMS_AWM.DELETE_AWDIMLOAD_SPEC('T_TIME', 'RTTARGET', 'T_TIME');
    --Deleting AW_CubeLoad_Spec
    DBMS_AWM.DELETE_AWCUBELOAD_SPEC('CUBESALESFACT', 'RTTARGET', 'CUBE_SALESFACT');
    DBMS_AW.EXECUTE('upd '||'RTTARGET'||'.'||'AW_WH_SALES' ||'; commit');
    Commit;
    --Deleting AggMap
    DBMS_AWM.Delete_AWCUBEAGG_SPEC('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT');
    DBMS_AW.EXECUTE('upd '||'RTTARGET'||'.'||'AW_WH_SALES' ||'; commit');
    Commit;
    EXCEPTION WHEN OTHERS THEN NULL;
    END;
    --Creating Agg Map for cube cube_salesfact
    -- DBMS_AWM.CREATE_AWCUBEAGG_SPEC(AggMap_Name , USER , AW_NAME, CUBE_NAME);
    DBMS_AWM.CREATE_AWCUBEAGG_SPEC('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT');
    --Specifying aggrgation for measures of cube
    DBMS_AWM.ADD_AWCUBEAGG_SPEC_MEASURE('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'STORECOST');
    DBMS_AWM.ADD_AWCUBEAGG_SPEC_MEASURE('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'STORESALES');
    DBMS_AWM.ADD_AWCUBEAGG_SPEC_MEASURE('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'UNITSALES');
    --Specifying aggrgation for different level of dimensions
    DBMS_AWM.ADD_AWCUBEAGG_SPEC_LEVEL('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'WH_T_TIME', 'L_ALLYEARS');
    DBMS_AWM.ADD_AWCUBEAGG_SPEC_LEVEL('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'WH_T_TIME', 'L_YEAR');
    DBMS_AWM.ADD_AWCUBEAGG_SPEC_LEVEL('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'WH_T_TIME', 'L_QUARTER');
    DBMS_AWM.ADD_AWCUBEAGG_SPEC_LEVEL('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'WH_T_TIME', 'L_MONTH');
    DBMS_AWM.ADD_AWCUBEAGG_SPEC_LEVEL('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'WH_DIM_STORE', 'L_ALLCOUNTRIES');
    DBMS_AWM.ADD_AWCUBEAGG_SPEC_LEVEL('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'WH_DIM_STORE', 'L_COUNTRY');
    DBMS_AWM.ADD_AWCUBEAGG_SPEC_LEVEL('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'WH_DIM_STORE', 'L_PROVINCE');
    DBMS_AWM.ADD_AWCUBEAGG_SPEC_LEVEL('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'WH_DIM_STORE', 'L_CITY');
    DBMS_AWM.ADD_AWCUBEAGG_SPEC_LEVEL('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'WH_DIM_PRODUCT', 'L_ALLPRODUCTS');
    DBMS_AWM.ADD_AWCUBEAGG_SPEC_LEVEL('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'WH_DIM_PRODUCT', 'L_BRANDCLASS');
    DBMS_AWM.ADD_AWCUBEAGG_SPEC_LEVEL('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'WH_DIM_PRODUCT', 'L_BRANDCATEGORY');
    DBMS_AWM.ADD_AWCUBEAGG_SPEC_LEVEL('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'WH_DIM_PRODUCT', 'L_BRAND');
    DBMS_AWM.ADD_AWCUBEAGG_SPEC_LEVEL('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'WH_DIM_DISTRIBUTOR', 'L_ALLDIST');
    DBMS_AWM.ADD_AWCUBEAGG_SPEC_LEVEL('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'WH_DIM_DISTRIBUTOR', 'L_DISTINCOME');
    DBMS_AWM.ADD_AWCUBEAGG_SPEC_LEVEL('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'WH_DIM_PROMOTION', 'L_ALLPROM');
    DBMS_AWM.ADD_AWCUBEAGG_SPEC_LEVEL('AGG_CUBESALESFACT', 'RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'WH_DIM_PROMOTION', 'L_PROMOTIONMEDIA');
    Begin
    --************************     CODE      **********************************
    --aw_dim.sql
    DBMS_AWM.CREATE_AWDIMLOAD_SPEC('DIM_DISTRIBUTOR', 'RTTARGET', 'DIM_DISTRIBUTOR', 'FULL_LOAD_ADDITIONS_ONLY');
    DBMS_AWM.REFRESH_AWDIMENSION('RTTARGET', 'AW_WH_SALES', 'WH_DIM_DISTRIBUTOR', 'DIM_DISTRIBUTOR');
    commit;
    DBMS_AWM.CREATE_AWDIMLOAD_SPEC('DIM_PRODUCT', 'RTTARGET', 'DIM_PRODUCT', 'FULL_LOAD_ADDITIONS_ONLY');
    DBMS_AWM.REFRESH_AWDIMENSION('RTTARGET', 'AW_WH_SALES', 'WH_DIM_PRODUCT', 'DIM_PRODUCT');
    commit;
    DBMS_AWM.CREATE_AWDIMLOAD_SPEC('DIM_PROMOTION', 'RTTARGET', 'DIM_PROMOTION', 'FULL_LOAD_ADDITIONS_ONLY');
    DBMS_AWM.REFRESH_AWDIMENSION('RTTARGET', 'AW_WH_SALES', 'WH_DIM_PROMOTION', 'DIM_PROMOTION');
    commit;
    DBMS_AWM.CREATE_AWDIMLOAD_SPEC('DIM_STORE', 'RTTARGET', 'DIM_STORE', 'FULL_LOAD_ADDITIONS_ONLY');
    DBMS_AWM.REFRESH_AWDIMENSION('RTTARGET', 'AW_WH_SALES', 'WH_DIM_STORE', 'DIM_STORE');
    commit;
    DBMS_AWM.CREATE_AWDIMLOAD_SPEC('T_TIME', 'RTTARGET', 'T_TIME', 'FULL_LOAD_ADDITIONS_ONLY');
    DBMS_AWM.REFRESH_AWDIMENSION('RTTARGET', 'AW_WH_SALES', 'WH_T_TIME', 'T_TIME');
    commit;
    --aw_cube.sql
    DBMS_AWM.CREATE_AWCUBELOAD_SPEC('CUBE_SALESFACT', 'RTTARGET', 'CUBE_SALESFACT', 'LOAD_DATA');
    dbms_awm.add_awcubeload_spec_measure('CUBE_SALESFACT', 'RTTARGET', 'CUBE_SALESFACT', 'STORECOST', 'STORECOST', 'STORECOST');
    dbms_awm.add_awcubeload_spec_measure('CUBE_SALESFACT', 'RTTARGET', 'CUBE_SALESFACT', 'STORESALES', 'STORESALES', 'STORESALES');
    dbms_awm.add_awcubeload_spec_measure('CUBE_SALESFACT', 'RTTARGET', 'CUBE_SALESFACT', 'UNITSALES', 'UNITSALES', 'UNITSALES');
    DBMS_AWM.REFRESH_AWCUBE('RTTARGET', 'AW_WH_SALES', 'WH_CUBE_SALESFACT', 'CUBE_SALESFACT');
    EXCEPTION WHEN OTHERS THEN NULL;
    END;
    -- Now build the cube. This may take some time on large cubes.
    -- DBMS_AWM.aggregate_awcube(USER, AW_NAME, CUBE_NAME, aggspec);
    DBMS_AWM.aggregate_awcube('RTTARGET','AW_WH_SALES', 'WH_CUBE_SALESFACT','AGG_CUBESALESFACT');
    DBMS_AW.EXECUTE('upd '||'RTTARGET'||'.'||'AW_WH_SALES' ||'; commit');
    Commit;
    CWM2_OLAP_METADATA_REFRESH.MR_REFRESH();
    CWM2_OLAP_METADATA_REFRESH.MR_AC_REFRESH();
    DBMS_AW.Execute('aw detach RTTARGET.AW_WH_Sales');
    CWM2_OLAP_MANAGER.END_LOG;
    cwm2_olap_manager.set_echo_off;
    EXCEPTION WHEN OTHERS THEN NULL;
    -- EXCEPTION WHEN OTHERS THEN RAISE;
    END;

  • OWB and AWM for loading DWH

    Hello,
    I am on the following version:
    DB: Oracle 10.2.0.1 (both source DB and target DWH)
    OWB : 10.2.0.1
    AWM : 10.2.0.1
    I have the following process:
    From the source DB I use OWB to load relational dimensions (SCD 2). I use AWM to load data from these dimensional tables to a Analytic workspace. I use OWB because I need to track changes (SCD) and use AWM because OWB currently does not support Parent-Child dimensions where as AWM supports. I would love to load AW from OWB directly if it had parent-child support.
    My question is:
    All the load should be trigger-based, When my process (SQL) completes on the source table the OWB process of loading the relational dimension should start which is not a problem, I using the run_owb_code.sql for this. once the run_owb_code is complete, I want the AWM's maintain data process to start. I don't know how to do it. I tried saving the maintenance task to script and tried executing it, it doesn't seem to work. I don't want to AWM and run cube maintenance every time the cube needs to be refreshed.
    Please note I don't have a cube in the relation world. My fact(cube) in the AW is a direct load from a table (as I don't need SCD here) so basically use OWB just to load the dimensions alone. AWM creates the actual cube with the dimension tables loaded using OWB and the fact table from source, So I don't think I can use the "dbms_awm.refresh_awcube(...".
    Can somebody please help me in automating this load process
    Thanks a lot in advance!
    Maruthi

    Hello,
    I am sorry, after some research, I came across this post
    Re: Cube and dimension refresh proactively
    As per the above post, the script that is generated using AWM will work if the AW is not attached by any user.
    I detached the AW and executed the script and the cube was populated with data.
    Thanks,
    Maruthi

  • Refresh Cube Error

    Oracle Analytic Workspace Manager 9.2.0.4
    Oracle database 9.2.0.6
    I have a cube with data pre-aggregated using NASKIP2. Everything worked fine until we needed to update our data (already updated in the relational tables). I tried to refresh the analytic workspace using the wizard in AWM but came up with the following error:
    Preparing
    Processing cube MY_CUBE
    Processing Defining Load for Cube: MY_CUBE
    Could not add measure NA to load. It is either not defined or deleted from the relational cube
    Could not add measure NA to load. It is either not defined or deleted from the relational cube
    Could not add measure NA to load. It is either not defined or deleted from the relational cube
    Could not add measure NA to load. It is either not defined or deleted from the relational cube
    Could not add measure NA to load. It is either not defined or deleted from the relational cube
    Could not add measure NA to load. It is either not defined or deleted from the relational cube
    Could not add measure NA to load. It is either not defined or deleted from the relational cube
    Could not add measure NA to load. It is either not defined or deleted from the relational cube
    Could not add measure NA to load. It is either not defined or deleted from the relational cube
    Could not add measure NA to load. It is either not defined or deleted from the relational cube
    Processing MY_CUBE Refresh
    Error Message from Server = Problem generating and executing sql to read cube data
    MY_CUBE
    MY_CUBE
    (LXSUBST02) The value of the ampersand-substitution expression is NA.
    In SYS.AWCREATE!___GEN.CUBE.SQL PROGRAM:
    &obj(property 'MEASCOLS' meas) lastcol)
    ^
    SqlException = ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "OLAPSYS.DBMS_AWM", line 1130
    ORA-06512: at line 1
    Error Code = 6510
    Sql State = 65000
    REFRESH_WIZARD.PAGE.IMPORT_FAILURE.COULD_NOT_REFRESH
    REFRESH_WIZARD.PAGE.IMPORT_FAILURE.CUBES_NOT_REFRESHED
    java.sql.SQLException: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "OLAPSYS.DBMS_AWM", line 1130
    ORA-06512: at line 1
    Tidying Up
    Any help would be much appreciated.

    It appears to be a result of AWM 9.2.0.4 generating invocations to dbms_awm.add_awcubeload_spec_measure, to specify which measures are going to be included in the load (i.e. the run of dbms_awm.refresh_awcube).
    Did you add any standard form measures manually to your analytic workspace which were never in the CWM1/CwMLite ROLAP cube?
    Did you delete any measures from your CWM1/CwMLite ROLAP cube in between building/refreshing the analytic workspace copy?
    AWM attempts to figure out which measures are candidates to be added to the load (i.e. which measures should have an invocation to dbms_awm.add_awcubeload_spec_measure added) by SQL against all_olap2_cube_measures (CwMLite measures) as well as all_olap2_aw_cube_measures (active catalog for analytic workspace measures.)

  • Problem refreshing AW Dimension

    I am trying to create an analytic workspace and I am using the AWM wizard for this job.
    I want to build a cube that is based only on two dimensions. To this end, I have created OLAP catalog metadata for the two dimensions and the cube via OEM successfully.
    Selecting on ALL_OLAP2_DIMENSIONS and ALL_OLAP2_CUBES returns that all objects are valid.
    However when the AWM wizard runs I get the following error
    when DBMS_AWM.REFRESH_AWDIMENSION is called for the first dimension:
    Processing Refreshing Dimension : TC6ACCOUNT_DIM
    Error Message from Server = Problem refreshing dimension:
    TC6ACCOUNT_DIM
    Failed to Build(Refresh) OLAPDUN.TESTCUBE6_AW Analytic Workspace. Error Validating Dimension Mappings TC6ACCOUNT_DIM.DIMENSION. Key Expression DUNMART.ACCOUNT_DIM.ACCNT_ID for Mapping Group TC6ACCOUNT_DIM.MARKET_SEGMENT_H.ACCOUNT_DIM_L.DUNMART_ACCOUNT_DIM_TC6ACCOUNT_DIM_MARKET_SEGMENT_H_ACCOUNT_DIM_L.DIMENSIONMAPGROUP, Level TC6ACCOUNT_DIM.ACCOUNT_DIM_L.LEVEL, Hierarchy TC6ACCOUNT_DIM.MARKET_SEGMENT_H.HIERARCHY is Incorrectly Mapped to RDBMS.
    I dont know what I'm doing wrong. If there was an error in the hierarchy, then why do I get a valid state for these objects from the ALL_OLAP2 views?
    I would appreciate it if anyone could help me out!
    Nikos

    Thanks Sharon for the tip. I have applied patch 10.1.0.3E and the dimensions were refreshed successfully.
    Unfortunately now another error was raised during the cube refreshing.
    More specifically I got the following error during the call:
    execute DBMS_AWM.REFRESH_AWCUBE('OLAPDUN', 'TESTCUBE7', 'TC7TESTCUBE7', 'TESTThu Mar 10 16:10:19 EET 2005');
    Error Message from Server = Problem getting dimensions for cube:
    DUNMART
    TESTCUBE7
    Aggregation Definition TC7TESTCUBE7.TC7TESTCUBE7_DA.AGGREGATIONDEFINITION is Invalid. Aggregation Definition TC7TESTCUBE7.TC7TESTCUBE7_DA.AGGREGATIONDEFINITION can not be Compiled.
    (AW$XML) AW$XML
    In SYS.AWXML!__XML_HANDLE_ERROR PROGRAM:
    SqlException = ORA-06502: PL/SQL: numeric or value error string
    ORA-06512: in "OLAPSYS.DBMS_AWM", line 1213
    ORA-06512: in line 1
    Error Code = 6502
    Sql State = 65000
    All the cubes could not be added to the Analytic Workspace TESTCUBE7;
    The following cubes could not be added : TESTCUBE7
    java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error string
    ORA-06512: in "OLAPSYS.DBMS_AWM", line 1213
    ORA-06512: in line 1
    Tidying Up
    Failed to create the analytic workspace
    Are there any suggestions for this error?
    thanks,
    Nikos

  • Dimension refresh by awm - spoils aggregation?

    I have a cube with a few dimensions. Dimensions are simple flat hierarchies. There are no precomputed aggreagtions defined.
    When i create new workspace and refresh all dimensions, everything works fine.
    But when i want to reload the cube using:
    DBMS_AWM.REFRESH_AWDIMENSION D1
    DBMS_AWM.REFRESH_AWDIMENSION D2
    DBMS_AWM.REFRESH_AWCUBE
    something goes wrong.
    The D1 Dimension doesn't want to aggregate at the higher levels (there are no precomputed aggregation so the cube should summarize everything on the fly) - the value for a higher levels of that dimension are NULL (other dimensions are ok).
    The cube is dimensioned by a composite with all dimensions within it.
    When i try to inspect where the problem is i checked:
    -in the composite there are all combinations of the lowest level members (and that is what i expected_.
    -there are no any higher level members at all in the composite (as i expected)
    -when i change refresh order then the problem occurs in the second dimension (always in the first refreshed dimension in a batch)
    -refreshing the same dimension twice almost resolved problem.
    What could be the problem?
    Why refreshing dimension causes that cube forgets how to aggregate that dimension?
    Raf
    PS: i work with 9iR2

    Could it be something with the fact i use AGGMAP with the AGGINDEX set to NO?
    I thought it only matters when using models.
    But i'm not using models.
    Im just trying to use:
    SHOW measure_formula
    where measure_formula is AGGREGATE function
    When i changed AGGINDEX to YES - the above SHOW command executes for ages... (the cube isn't big - abut 300 000 cells in a composite and about 10 dimensions)
    Raf

  • Refreshing deleted cube cells

    When I execute dbms_awm.refresh_awcube it loads new cells and updates changed cells based on a source cube (Oracle9iR2).
    But when in the source cube a cell doesn't exist anymore the dbms_awm.refresh_awcube doesn't remove them from the olap variable (the old values still exist there, while there are no values for them in a fact table).
    The same thing happens when you reduce the level of aggregation.
    For instance: I have dimension with levels A->B->C.
    I aggreagated level C, B and A.
    But when i change it to aggregate only levels C an B, the A level cells still exist in a variable. Summary shows null for the level A (it should compute summaries on the fly for the level A).
    And third thing: When i refresh cube when the new fact data has less rows - i expect the composite (i have all of the dimensions put in a composite) to reduce its size. but it doesn't happen.
    What should i do to refresh cube (with some cells added, some missed) properly?
    Raf

    in other words:
    do i always need to execute MAINTAIN my_composite DELETE every time before i'm reloading the cube?
    Raf

  • Error while refreshing aw_cube from pl/sql package

    Hi, I want to refresh data in an analytic workspace cube with PL/SQL code.
    If I execute DBMS_AWM methods in a PL/SQL block, it refresh without problems.
    But, strangely, if I put this methods together in a package procedure and try to execute it, I find an error.
    My data are:
    owner_olap = SAC
    cube_name_olap = AFILIADOS_SS_CB
    table_source_olap = FACT_AFILIADOS
    measure_name_olap = AFILIADOS_SS
    owner_aw = SAC_AW1
    name_aw = AW1
    cube_name_aw = AFILIADOS_SS_CB
    The code that refresh ok is:
    DBMS_AW.EXECUTE('AW ATTACH SAC_AW1.AW1 RWX;');
    DBMS_AWM.CREATE_AWCUBELOAD_SPEC('SPEC1', 'SAC', 'AFILIADOS_SS_CB', 'LOAD_DATA');
    DBMS_AWM.ADD_AWCUBELOAD_SPEC_MEASURE('SPEC1', 'SAC', 'AFILIADOS_SS_CB', 'AFILIADOS_SS');
    DBMS_AWM.REFRESH_AWCUBE('SAC_AW1', 'AW1', 'AFILIADOS_SS_CB', 'SPEC1');
    DBMS_AWM.DELETE_AWCUBELOAD_SPEC('SPEC1', 'SAC', 'AFILIADOS_SS_CB');
    DBMS_AW.EXECUTE('AW DETACH SAC_AW1.AW1;');
    If I put this statements (exactly the same) in a procedure, when I try to execute it I get this error:
    EXCEPTION thrown in cwm2_olap_aw_awutil.FetchAWLog()
    AW command: 'show convert(REFRESH_AWCUBE('SAC_AW1' 'AW1' 'AFILIADOS_SS_CB'
    'SAC_AW1.AW1.AFILIADOS_SS_CB_CUB_SPEC') text)'
    AW Error Text
    (MXXEQ35) SAC.FACT_AFILIADOS_SS no es un SYS.AWCREATE!SYS_SRCTBLDIM válido.
    In
    SYS.AWCREATE!___GEN.CUBE.SQL PROGRAM:
    lmt SYS_SRCTBLDIM to &_CUBESQLDMN.FT
    ifnone NOFILTERS
    ORA-00942: la tabla o vista no existe
    My database version is 9.2.0.6
    Some idea ? Privileges or permissions ? Thanks a lot

    Hi,
    CREATE OR REPLACE PROCEDURE Testkibor
         (contno  IN VARCHAR)
    AS
    BEGIN
      DECLARE
        CURSOR c1 IS
          SELECT *
          FROM   kibor_schedule
          WHERE  cn = contno;
      BEGIN
    --//    OPEN c1; --no need to open if using for loop
        FOR line IN c1 LOOP
          UPDATE kibor_schedule
          SET    lincome = line.lincome,
                 expo = line.expo,
                 pport = line.pport
          WHERE  cn = line.cn
                 AND rno = line.rno;
        END LOOP;
        COMMIT;
    --//     CLOSE c1; -- no need for loop  does it for you
      END;
    END testkibor;SS

  • Problems in the creation of a MOLAP Cube with DBMS_AWM.

    I want to create a MOLAP Cube with the package DBMS_AWM. So I create the ROLAP Cube and the Dimensions with the Enterprise Manager Website, and all works perfectly. Then I executed the code to create the multidimensional dimensions and the multidimensional cube (awm dimensions/cubes), but I had some problems in the first dimension.
    This dimension has the name D_DESTIN, and has the following hierarchy:
    +DESTIN_DESC_H3
    |
    +---DESTIN_DESC_H2
    |
    +------DESTIN_DESC_H1
    |
    +---------DESTIN_DESC_H0
    The name of the hierarchy is H_D_DESTIN.
    The following code is the code that I used to create the first multidimensional dimension:
    set serveroutput on
    execute cwm2_olap_manager.set_echo_on;
    execute dbms_aw.execute ('aw create ''WTESTE''');
    execute dbms_awm.create_awdimension('EXEMPLO_OLAP', 'D_DESTIN', 'EXEMPLO_OLAP','WTESTE', 'WD_DESTIN');
    execute dbms_awm.create_awdimload_spec('D_DESTIN_LOAD', 'EXEMPLO_OLAP', 'D_DESTIN', 'FULL_LOAD');
    execute DBMS_AWM.SET_AWDIMLOAD_SPEC_PARAMETER ('D_DESTIN_LOAD','EXEMPLO_OLAP','D_DESTIN','UNIQUE_RDBMS_KEY','NO');
    execute dbms_awm.refresh_awdimension('EXEMPLO_OLAP', 'WTESTE', 'WD_DESTIN', 'D_DESTIN_LOAD');
    commit;
    execute cwm2_olap_manager.set_echo_off;
    execute cwm2_olap_manager.end_log
    When I executed the code above, I got the following error:
    PL/SQL procedure successfully completed.
    SP2-0103: Nothing in SQL buffer to run.
    PL/SQL procedure successfully completed.
    AMD-00001 created AWDimension "EXEMPLO_OLAP.WTESTE.WD_DESTIN"
    PL/SQL procedure successfully completed.
    AMD-00001 created AWDimLoad_Spec "D_DESTIN_LOAD.EXEMPLO_OLAP.D_DESTIN"
    PL/SQL procedure successfully completed.
    AMD-00002 set AWDimLoad_Spec_Parameter "D_DESTIN_LOAD.EXEMPLO_OLAP.D_DESTIN"
    UNIQUE_RDBMS_KEY to "NO"
    PL/SQL procedure successfully completed.
    ERROR Create_AWDimension. Problem refreshing dimension:
    WD_DESTIN
    Error
    Validating Dimension Mappings WD_DESTIN.DIMENSION. Key Expression
    DWH.D_DESTIN.DESTIN_KEY for Mapping Group
    WD_DESTIN.H_D_DESTIN.DESTIN_DESC_H0.DWH_D_DESTIN_WD_DESTIN_H_D_DESTIN
    DESTINDESC_H0.DIMENSIONMAPGROUP, Level WD_DESTIN.DESTIN_DESC_H0.LEVEL,
    Hierarchy WD_DESTIN.H_D_DESTIN.HIERARCHY is Incorrectly Mapped to
    RDBMS.
    (AW$XML) AW$XML
    In SYS.AWXML!__XML_HANDLE_ERROR PROGRAM:
    BEGIN dbms_awm.refresh_awdimension('EXEMPLO_OLAP', 'WTESTE',
    'WD_DESTIN', 'D_DESTIN_LOAD'); END;
    ERROR at line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "OLAPSYS.DBMS_AWM", line 1012
    ORA-06512: at line 1
    Commit complete.
    PL/SQL procedure successfully completed.
    PL/SQL procedure successfully completed.
    I don’t know what is wrong. The ROLAP Cube is valid according to Oracle Enterprise Manager Website, and it is possible to consult its data with "OracleBI Spreadsheet Add-In"
    What is wrong?
    Regards,
    Rui Torres

    I executed the same code in a different user and the MOLAP Cube was created successfully.
    But, I don’t know what is the privilege/role, that permits this second user to create a MOLAP cube with the package DBMS_AWM.
    The privileges/roles of the first user are:
    ROLES
    ======
    CONNECT
    OLAP_DBA
    OLAP_USER
    OWBR_EXEMPLO_OLAP
    OWB_EXEMPLO_OLAP
    SYSTEM PRIVILEGES
    =================
    ALTER SESSION     
    CREATE ANY PROCEDURE     
    CREATE DATABASE LINK     
    CREATE DIMENSION     
    CREATE INDEXTYPE     
    CREATE MATERIALIZED VIEW     
    CREATE PROCEDURE     
    CREATE PUBLIC DATABASE LINK     
    CREATE PUBLIC SYNONYM     
    CREATE ROLE     
    CREATE SEQUENCE     
    CREATE SESSION     
    CREATE SYNONYM     
    CREATE TABLE     
    CREATE TRIGGER     
    CREATE TYPE     
    CREATE VIEW     
    DROP ANY PROCEDURE     
    DROP PUBLIC SYNONYM     
    EXECUTE ANY PROCEDURE     
    GLOBAL QUERY REWRITE     
    SELECT ANY TABLE     
    SYSDBA     
    UNLIMITED TABLESPACE
    OBJECTS PRIVILEGES
    ==================
    Object      Privilege     |Schema |Object     
    =======================================================
    SELECT               |SYS     |DBA_ROLE_PRIVS     
    EXECUTE               |SYS     |DBMS_LOCK     
    SELECT               |SYS     |DBMS_LOCK_ALLOCATED     
    EXECUTE               |SYS     |DBMS_OBFUSCATION_TOOLKIT     
    EXECUTE               |SYS     |DBMS_SNAPSHOT     
    SELECT               |SYS     |V_$LOCK     
    SELECT               |SYS     |V_$MYSTAT     
    SELECT               |SYS     |V_$SESSION     
    SELECT               |SYS     |V_$SYSTEM_PARAMETER
    The privileges/roles of the second user are:
    ROLES
    ======
    AQ_ADMINISTRATOR_ROLE          
    DBA          
    MGMT_USER
    SYSTEM PRIVILEGES
    =================
    CREATE MATERIALIZED VIEW     
    CREATE TABLE     
    GLOBAL QUERY REWRITE     
    SELECT ANY TABLE     
    UNLIMITED TABLESPACE
    OBJECTS PRIVILEGES
    ==================
    Object Privilege     |Schema     |Object     
    =============================================
    EXECUTE               |SYS     |DBMS_ALERT     
    EXECUTE               |SYS     |DBMS_AQ     
    EXECUTE               |SYS     |DBMS_AQADM     
    EXECUTE               |SYS     |DBMS_AQELM     
    EXECUTE               |SYS     |DBMS_AQ_IMPORT_INTERNAL     
    EXECUTE               |SYS     |DBMS_DEFER_IMPORT_INTERNAL     
    EXECUTE               |SYS     |DBMS_REPCAT     
    EXECUTE               |SYS     |DBMS_RULE_EXIMP     
    EXECUTE               |SYS     |DBMS_SYS_ERROR     
    EXECUTE               |SYS     |DBMS_TRANSFORM_EXIMP     
    ALTER               |SYS     |INCEXP     
    DEBUG               |SYS     |INCEXP     
    DELETE               |SYS     |INCEXP     
    FLASHBACK          |SYS     |INCEXP     
    INDEX               |SYS     |INCEXP     
    INSERT               |SYS     |INCEXP     
    ON COMMIT REFRESH     |SYS     |INCEXP     
    QUERY REWRITE          |SYS     |INCEXP     
    REFERENCES          |SYS     |INCEXP     
    SELECT               |SYS     |INCEXP     
    UPDATE               |SYS     |INCEXP     
    ALTER               |SYS     |INCFIL     
    DEBUG               |SYS     |INCFIL     
    DELETE               |SYS     |INCFIL     
    FLASHBACK          |SYS     |INCFIL
    Which privilege/role permits the second user to create a MOLAP cube?
    Regards,
    Rui Torres

  • Dbms_awm Package

    Hello,
    in 10g Release 1 i can us the dbms_awm Package to create Analytic Workspaces. Can i create Analytic Workspaces in 10g Releas 2 on the same way?? Because in the OLAP Reference for this Release the Package where not named.

    This is slightly strange, I just went back to the link above and the information is not there anymore - bad day at the office I think. Anyway, it is all definitely in the 10.1 documentation set at:
    http://www.oracle.com/pls/db10g/portal.portal_demo3?selected=6
    See the OLAP Reference Guide:
    http://download.oracle.com/docs/cd/B14117_01/olap.101/b10334/toc.htm
    But if you Google DBMS_AWM you can get a link to the old version of 10gR2 OLAP Reference Guide at this site (but I have no idea who owns this site):
    http://docs.huihoo.com/oracle/docs/B19306_01/olap.102/b14350/using_dbmsawm002.htm
    Can't quite understand why these docs are not on the OTN website. But that's life.
    Keith

  • Incremental aggregation using dbms_awm.aggregate_awcube

    Is it possible to process an aggregation in an incremental way?
    I use dbms_awm.aggregate_awcube package to do it.
    Regards

    You can save the XML Templates on a sever directory (which is accessible through Oracle DB directory alias), and then use plsql to drop and recreate the AW from those XML files. I did that at a client site and it worked out very well. No Java or OLAP was used - just plsql procedure. Every night, before the load, AW$... table was dropped and then recreated and then loaded - all through plsql. At this moment, I don't have access to that code. I will look for it.
    - Nasar
    .

  • Error while creating AW

    Hi
    I got following error while creating AW via Wizard.
    Preparing
    Creating analytic workspace...
    Processing cube REFCOST
    Processing Creating Dimension : REFPRODUCT
    Processing Creating Dimension : REFTIME
    Processing Defining Load for Dimension: REFPRODUCT
    Processing Refreshing Dimension : REFPRODUCT
    Processing Defining Load for Dimension: REFTIME
    Processing Refreshing Dimension : REFTIME
    Processing Creating Cube : REFCOST
    Processing Defining Load for Cube: REFCOST
    SqlException = ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "OLAPSYS.DBMS_AWM_PRV", line 469
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at "OLAPSYS.DBMS_AWM_PRV", line 983
    ORA-06512: at "OLAPSYS.DBMS_AWM", line 428
    ORA-06512: at line 1
    Error Code = 6510
    Sql State = 65000
    All the cubes could not be added to the Analytic Workspace COST;
    The following cubes could not be added : COST
    java.sql.SQLException: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "OLAPSYS.DBMS_AWM_PRV", line 469
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at "OLAPSYS.DBMS_AWM_PRV", line 983
    ORA-06512: at "OLAPSYS.DBMS_AWM", line 428
    ORA-06512: at line 1
    Tidying Up
    Failed to create the analytic workspace
    Can anyone point out why this error is coming?
    Hrishi

    Did you change any of the text in the lob write statements ?
    I believe you get this error if you increase the number of characters without increasing the 1st argument which looks as though it represents the number of characters

  • Error while creating the AW

    Hi,
    While creating the analytic workspace I am getting following message..
    Can anyone please tell what might have gone wrong? Any help will be appriciated.
    Preparing
    Creating analytic workspace...
    Processing cube AW_SALES_CUBE
    Processing Creating Dimension : AW_CUST_DIM
    Processing Creating Dimension : AW_PROD_DIM
    Processing Creating Cube : AW_SALES_CUBE
    Processing Defining Load for Cube: AW_SALES_CUBE
    SqlException = ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "OLAPSYS.DBMS_AWM_PRV", line 469
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at "OLAPSYS.DBMS_AWM_PRV", line 983
    ORA-06512: at "OLAPSYS.DBMS_AWM", line 428
    ORA-06512: at line 1
    Error Code = 6510
    Sql State = 65000
    All the cubes could not be added to the Analytic Workspace AWSALE;
    The following cubes could not be added : SALES_CUBE
    Could not generate SQL for Views and ADTS for OLAP API and beans enabling.
    java.sql.SQLException: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "OLAPSYS.DBMS_AWM_PRV", line 469
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at "OLAPSYS.DBMS_AWM_PRV", line 983
    ORA-06512: at "OLAPSYS.DBMS_AWM", line 428
    ORA-06512: at line 1
    Tidying Up
    Failed to create the analytic workspace

    The versions are follows..
    Also, I tried with another set of tables. But, I still got the same errors. I am attaching all those details..
    Please help..
    --SOFTWARES....
    --Oracle Database:
    Oracle9i Enterprise Edition Release 9.2.0.5.0 - 64bit Production
    With the Partitioning and OLAP options
    JServer Release 9.2.0.5.0 - Production
    --OEM
    9.2.0.1.0 Production
    --AWM
    9.2.0.4.1D
    --TABLE CREATION SCRIPTS
    Note: I created the following tables in user RMS_PROTOTYPE
    create table meter (
    meter_id number(10),
    meter_name varchar2(40),
    make_id number(10),
    make_name varchar2(40)
    alter table meter
    add constraints meter_pk
    PRIMARY KEY (meter_id)
    NORELY DISABLE NOVALIDATE;
    create table month (
    month_id number(10),
    month_name varchar2(40)
    alter table month
    add constraints month_pk
    PRIMARY KEY (month_id)
    NORELY DISABLE NOVALIDATE;
    create table invoice (
    invoice_id number(10),
    month_id number(10),
    meter_id number(10),
    invoice_amount number(16,2)
    alter table invoice
    add constraints invoice_pk
    PRIMARY KEY (invoice_id)
    NORELY DISABLE NOVALIDATE;
    alter table invoice
    add constraints invoice_meter_fk
    FOREIGN KEY (meter_id)
    REFERENCES meter (meter_id)
    NORELY DISABLE NOVALIDATE;
    alter table invoice
    add constraints invoice_month_fk
    FOREIGN KEY (month_id)
    REFERENCES month (month_id)
    NORELY DISABLE NOVALIDATE;
    Note: I created the following dimensions/cube in user RMS_PROTOTYPE
    --METER DIMENSION
    CREATE DIMENSION RMS_PROTOTYPE.METER_DIM
    LEVEL LVL_METER IS METER.METER_ID
    ATTRIBUTE LVL_METER DETERMINES (METER.MAKE_ID, METER.METER_NAME, METER.MAKE_NAME)
    begin
    cwm_classify.remove_entity_descriptor_use(28, cwm_utility.DIMENSION_TYPE, 'RMS_PROTOTYPE', 'METER_DIM');
    cwm_olap_dimension.set_plural_name('RMS_PROTOTYPE', 'METER_DIM', 'METER_DIM');
    cwm_olap_dimension.set_display_name('RMS_PROTOTYPE', 'METER_DIM', 'METER_DIM');
    cwm_olap_dimension.set_description('RMS_PROTOTYPE', 'METER_DIM', 'Meter Dimension');
    cwm_olap_level.set_display_name('RMS_PROTOTYPE', 'METER_DIM', 'LVL_METER', 'LVL_METER');
    cwm_olap_level.set_description('RMS_PROTOTYPE', 'METER_DIM', 'LVL_METER', 'Level Meter');
    cwm_olap_level_attribute.set_name('RMS_PROTOTYPE', 'METER_DIM', 'LVL_METER', 'MAKE_ID', 'MAKE_ID');
    cwm_olap_level_attribute.set_name('RMS_PROTOTYPE', 'METER_DIM', 'LVL_METER', 'METER_NAME', 'METER_NAME');
    cwm_olap_level_attribute.set_name('RMS_PROTOTYPE', 'METER_DIM', 'LVL_METER', 'MAKE_NAME', 'MAKE_NAME');
    cwm_olap_dim_attribute.create_dimension_attribute('RMS_PROTOTYPE', 'METER_DIM', 'MTR_Name', 'MTR_Name', 'Meter Name');
    cwm_classify.add_entity_descriptor_use(41, cwm_utility.DIMENSION_ATTRIBUTE_TYPE, 'RMS_PROTOTYPE', 'METER_DIM', 'MTR_Name');
    cwm_olap_dim_attribute.create_dimension_attribute('RMS_PROTOTYPE', 'METER_DIM', 'Mk_Id', 'Mk_Id', 'Maker Id');
    cwm_classify.add_entity_descriptor_use(42, cwm_utility.DIMENSION_ATTRIBUTE_TYPE, 'RMS_PROTOTYPE', 'METER_DIM', 'Mk_Id');
    cwm_olap_dim_attribute.create_dimension_attribute('RMS_PROTOTYPE', 'METER_DIM', 'Mk_Name', 'Mk_Name', 'Maker Name');
    cwm_olap_dim_attribute.add_level_attribute('RMS_PROTOTYPE', 'METER_DIM', 'MTR_Name', 'LVL_METER', 'METER_NAME');
    cwm_olap_dim_attribute.add_level_attribute('RMS_PROTOTYPE', 'METER_DIM', 'Mk_Id', 'LVL_METER', 'MAKE_ID');
    cwm_olap_dim_attribute.add_level_attribute('RMS_PROTOTYPE', 'METER_DIM', 'Mk_Name', 'LVL_METER', 'MAKE_NAME');
    cwm_classify.add_entity_descriptor_use(41, cwm_utility.LEVEL_ATTRIBUTE_TYPE, 'RMS_PROTOTYPE', 'METER_DIM', 'LVL_METER', 'METER_NAME');
    cwm_classify.add_entity_descriptor_use(42, cwm_utility.LEVEL_ATTRIBUTE_TYPE, 'RMS_PROTOTYPE', 'METER_DIM', 'LVL_METER', 'MAKE_ID');
    commit;
    end;
    --Month DIMENSION
    CREATE DIMENSION RMS_PROTOTYPE.MONTH_DIM
    LEVEL LVL_MONTH IS MONTH.MONTH_ID
    ATTRIBUTE LVL_MONTH DETERMINES MONTH.MONTH_NAME
    begin
    cwm_classify.remove_entity_descriptor_use(28, cwm_utility.DIMENSION_TYPE, 'RMS_PROTOTYPE', 'MONTH_DIM');
    cwm_olap_dimension.set_plural_name('RMS_PROTOTYPE', 'MONTH_DIM', 'MONTH_DIM');
    cwm_olap_dimension.set_display_name('RMS_PROTOTYPE', 'MONTH_DIM', 'MONTH_DIM');
    cwm_olap_dimension.set_description('RMS_PROTOTYPE', 'MONTH_DIM', 'Month Dimension');
    cwm_olap_level.set_display_name('RMS_PROTOTYPE', 'MONTH_DIM', 'LVL_MONTH', 'LVL_MONTH');
    cwm_olap_level.set_description('RMS_PROTOTYPE', 'MONTH_DIM', 'LVL_MONTH', 'Month Level');
    cwm_olap_level_attribute.set_name('RMS_PROTOTYPE', 'MONTH_DIM', 'LVL_MONTH', 'MONTH_NAME', 'MONTH_NAME');
    cwm_olap_dim_attribute.create_dimension_attribute('RMS_PROTOTYPE', 'MONTH_DIM', 'MNTH_NAME', 'MNTH_NAME', 'Month Name');
    cwm_classify.add_entity_descriptor_use(41, cwm_utility.DIMENSION_ATTRIBUTE_TYPE, 'RMS_PROTOTYPE', 'MONTH_DIM', 'MNTH_NAME');
    cwm_olap_dim_attribute.add_level_attribute('RMS_PROTOTYPE', 'MONTH_DIM', 'MNTH_NAME', 'LVL_MONTH', 'MONTH_NAME');
    cwm_classify.add_entity_descriptor_use(41, cwm_utility.LEVEL_ATTRIBUTE_TYPE, 'RMS_PROTOTYPE', 'MONTH_DIM', 'LVL_MONTH', 'MONTH_NAME');
    commit;
    end;
    --SALE CUBE
    declare MTR_DIM number;
    MTH_DIM number;
    tmp number;
    begin
    CWM_OLAP_CUBE.Create_Cube('RMS_PROTOTYPE', 'INV_CUBE', 'Invoice Cube', '');
    MTR_DIM := CWM_OLAP_CUBE.Add_Dimension('RMS_PROTOTYPE', 'INV_CUBE', 'RMS_PROTOTYPE', 'METER_DIM', 'MTR_DIM');
    CWM_OLAP_CUBE.Map_Cube('RMS_PROTOTYPE', 'INV_CUBE', 'RMS_PROTOTYPE', 'INVOICE', 'INVOICE_METER_FK', 'LVL_METER', 'RMS_PROTOTYPE', 'METER_DIM', 'MTR_DIM');
    MTH_DIM := CWM_OLAP_CUBE.Add_Dimension('RMS_PROTOTYPE', 'INV_CUBE', 'RMS_PROTOTYPE', 'MONTH_DIM', 'MTH_DIM');
    CWM_OLAP_CUBE.Map_Cube('RMS_PROTOTYPE', 'INV_CUBE', 'RMS_PROTOTYPE', 'INVOICE', 'INVOICE_MONTH_FK', 'LVL_MONTH', 'RMS_PROTOTYPE', 'MONTH_DIM', 'MTH_DIM');
    CWM_OLAP_MEASURE.Create_Measure('RMS_PROTOTYPE', 'INV_CUBE', 'INVOICE_AMOUNT', 'Invoice Amount', '');
    CWM_OLAP_MEASURE.Set_Column_Map('RMS_PROTOTYPE', 'INV_CUBE', 'INVOICE_AMOUNT', 'RMS_PROTOTYPE', 'INVOICE', 'INVOICE_AMOUNT');
    CWM_OLAP_MEASURE.Create_Measure('RMS_PROTOTYPE', 'INV_CUBE', 'INVOICE_ID', 'Invoice Id', '');
    CWM_OLAP_MEASURE.Set_Column_Map('RMS_PROTOTYPE', 'INV_CUBE', 'INVOICE_ID', 'RMS_PROTOTYPE', 'INVOICE', 'INVOICE_ID');
    tmp:= cwm_utility.create_function_usage('SUM');
    cwm_olap_measure.set_default_aggregation_method('RMS_PROTOTYPE', 'INV_CUBE', 'INVOICE_AMOUNT', tmp, 'RMS_PROTOTYPE', 'METER_DIM', 'MTR_DIM');
    tmp:= cwm_utility.create_function_usage('SUM');
    cwm_olap_measure.set_default_aggregation_method('RMS_PROTOTYPE', 'INV_CUBE', 'INVOICE_AMOUNT', tmp, 'RMS_PROTOTYPE', 'MONTH_DIM', 'MTH_DIM');
    tmp:= cwm_utility.create_function_usage('SUM');
    cwm_olap_measure.set_default_aggregation_method('RMS_PROTOTYPE', 'INV_CUBE', 'INVOICE_ID', tmp, 'RMS_PROTOTYPE', 'METER_DIM', 'MTR_DIM');
    tmp:= cwm_utility.create_function_usage('SUM');
    cwm_olap_measure.set_default_aggregation_method('RMS_PROTOTYPE', 'INV_CUBE', 'INVOICE_ID', tmp, 'RMS_PROTOTYPE', 'MONTH_DIM', 'MTH_DIM');
    commit;
    end;
    Note: I tried to create the analytic workspace in user RMS_PROTOTYPE_AW. But I got the following error.
    --ERROR in AWM
    Preparing
    Creating analytic workspace...
    Processing cube P_INV_CUBE
    Processing Creating Dimension : P_METER_DIM
    Processing Creating Dimension : P_MONTH_DIM
    Processing Creating Cube : P_INV_CUBE
    Processing Defining Load for Cube: P_INV_CUBE
    SqlException = ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "OLAPSYS.DBMS_AWM_PRV", line 469
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at "OLAPSYS.DBMS_AWM_PRV", line 983
    ORA-06512: at "OLAPSYS.DBMS_AWM", line 428
    ORA-06512: at line 1
    Error Code = 6510
    Sql State = 65000
    All the cubes could not be added to the Analytic Workspace AW_INV_01;
    The following cubes could not be added : INV_CUBE
    java.sql.SQLException: ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "OLAPSYS.DBMS_AWM_PRV", line 469
    ORA-01422: exact fetch returns more than requested number of rows
    ORA-06512: at "OLAPSYS.DBMS_AWM_PRV", line 983
    ORA-06512: at "OLAPSYS.DBMS_AWM", line 428
    ORA-06512: at line 1
    Tidying Up
    Failed to create the analytic workspace
    Thanks in advance.

Maybe you are looking for