[@more@]
在部署立方的时候,报错以下错误:
ORA-06510: PL/SQL: unhandled user-defined exception
ORA-06512: at "OLAPSYS.CWM2_OLAP_UTILITY", line 1660
ORA-01403: no data found
ORA-06512: at "OLAPSYS.CWM2_OLAP_CUBE", line 33
ORA-06512: at "OLAPSYS.CWM2_OLAP_CUBE", line 55
ORA-06512: at "OLAPSYS.CWM2_OLAP_CUBE", line 386
ORA-06512: at line 10
立方部署到CWM2中,而引用的一个维部署到CWM2中,而另一个没有部署到CWM2。
可以通过调试,查看错误原因:
SQL> set serveroutput on size 999999;
SQL> set serveroutput on size 999999;
SQL> exec cwm2_olap_manager.set_echo_on;
PL/SQL procedure successfully completed
然后执行部署立方的脚本
SQL>
SQL> WHENEVER SQLERROR EXIT FAILURE;
SQL> BEGIN
2 CWM2_OLAP_CUBE.CREATE_CUBE('NTGT_USER', 'FAITHFULNESS', 'FAITHFULNESS', 'FAITHFULNESS', 'null');
3 CWM2_OLAP_MEASURE.CREATE_MEASURE('NTGT_USER', 'FAITHFULNESS', 'MONEY', 'MONEY', 'MONEY', 'MONEY');
4 CWM2_OLAP_MEASURE.CREATE_MEASURE('NTGT_USER', 'FAITHFULNESS', 'SHARES', 'SHARES', 'SHARES', 'SHARES');
5 CWM2_OLAP_MEASURE.CREATE_MEASURE('NTGT_USER', 'FAITHFULNESS', 'BUYCOUNT', 'FUNDNAME', 'BUYCOUNT', 'BUYCOUNT');
6 CWM2_OLAP_CUBE.ADD_DIMENSION_TO_CUBE('NTGT_USER', 'FAITHFULNESS', 'NTGT_USER', 'BUSTYPE');
7 CWM2_OLAP_CUBE.ADD_DIMENSION_TO_CUBE('NTGT_USER', 'FAITHFULNESS', 'NTGT_USER', 'FUND');
8 CWM2_OLAP_CUBE.ADD_DIMENSION_TO_CUBE('NTGT_USER', 'FAITHFULNESS', 'NTGT_USER', 'TIMES');
9 CWM2_OLAP_CUBE.ADD_DIMENSION_TO_CUBE('NTGT_USER', 'FAITHFULNESS', 'NTGT_USER', 'FUNDALIAS');
10 CWM2_OLAP_CUBE.ADD_DIMENSION_TO_CUBE('NTGT_USER', 'FAITHFULNESS', 'NTGT_USER', 'CUSTREGION');
11 CWM2_OLAP_CUBE.ADD_DIMENSION_TO_CUBE('NTGT_USER', 'FAITHFULNESS', 'NTGT_USER', 'CUSTTYPE');
12 CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_LEVELKEY ('NTGT_USER','FAITHFULNESS','NTGT_USER','FAITHFULNESS','LOWESTLEVEL','DIM:NTGT_USER.BUSTYPE/HIER:NONE/LVL:TYPE/COL:BUSTYPE;DIM:NTGT_USER.FUND/HIER:STANDARD/LVL:FUND/COL:FUND;DIM:NTGT_USER.TIMES/HIER:CALENDAR_STANDARD/LVL:DAY/COL:TIMES;DIM:NTGT_USER.FUNDALIAS/HIER:STANDARD/LVL:FUND/COL:FUNDALIAS;DIM:NTGT_USER.CUSTREGION/HIER:STANDARD/LVL:CITY/COL:CUSTREGION;DIM:NTGT_USER.CUSTTYPE/HIER:NONE/LVL:CATEGORY/COL:CUSTTYPE;');
13 CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE ('NTGT_USER','FAITHFULNESS','MONEY','NTGT_USER','FAITHFULNESS','MONEY','DIM:NTGT_USER.BUSTYPE/HIER:NONE/LVL:TYPE/COL:BUSTYPE;DIM:NTGT_USER.FUND/HIER:STANDARD/LVL:FUND/COL:FUND;DIM:NTGT_USER.TIMES/HIER:CALENDAR_STANDARD/LVL:DAY/COL:TIMES;DIM:NTGT_USER.FUNDALIAS/HIER:STANDARD/LVL:FUND/COL:FUNDALIAS;DIM:NTGT_USER.CUSTREGION/HIER:STANDARD/LVL:CITY/COL:CUSTREGION;DIM:NTGT_USER.CUSTTYPE/HIER:NONE/LVL:CATEGORY/COL:CUSTTYPE;');
14 CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE ('NTGT_USER','FAITHFULNESS','SHARES','NTGT_USER','FAITHFULNESS','SHARES','DIM:NTGT_USER.BUSTYPE/HIER:NONE/LVL:TYPE/COL:BUSTYPE;DIM:NTGT_USER.FUND/HIER:STANDARD/LVL:FUND/COL:FUND;DIM:NTGT_USER.TIMES/HIER:CALENDAR_STANDARD/LVL:DAY/COL:TIMES;DIM:NTGT_USER.FUNDALIAS/HIER:STANDARD/LVL:FUND/COL:FUNDALIAS;DIM:NTGT_USER.CUSTREGION/HIER:STANDARD/LVL:CITY/COL:CUSTREGION;DIM:NTGT_USER.CUSTTYPE/HIER:NONE/LVL:CATEGORY/COL:CUSTTYPE;');
15 CWM2_OLAP_TABLE_MAP.MAP_FACTTBL_MEASURE ('NTGT_USER','FAITHFULNESS','BUYCOUNT','NTGT_USER','FAITHFULNESS','BUYCOUNT','DIM:NTGT_USER.BUSTYPE/HIER:NONE/LVL:TYPE/COL:BUSTYPE;DIM:NTGT_USER.FUND/HIER:STANDARD/LVL:FUND/COL:FUND;DIM:NTGT_USER.TIMES/HIER:CALENDAR_STANDARD/LVL:DAY/COL:TIMES;DIM:NTGT_USER.FUNDALIAS/HIER:STANDARD/LVL:FUND/COL:FUNDALIAS;DIM:NTGT_USER.CUSTREGION/HIER:STANDARD/LVL:CITY/COL:CUSTREGION;DIM:NTGT_USER.CUSTTYPE/HIER:NONE/LVL:CATEGORY/COL:CUSTTYPE;');
16 BEGIN
17 CWM2_OLAP_CUBE.SET_AGGREGATION_OPERATOR ('NTGT_USER','FAITHFULNESS','DIM:NTGT_USER.BUSTYPE/AGGOP:SUM;DIM:NTGT_USER.FUND/AGGOP:SUM;DIM:NTGT_USER.TIMES/AGGOP:SUM;DIM:NTGT_USER.FUNDALIAS/AGGOP:SUM;DIM:NTGT_USER.CUSTREGION/AGGOP:SUM;DIM:NTGT_USER.CUSTTYPE/AGGOP:SUM;');
18 EXCEPTION WHEN OTHERS THEN NULL; END;
19 CWM2_OLAP_VALIDATE.VALIDATE_CUBE('NTGT_USER','FAITHFULNESS');
20 CWM2_OLAP_METADATA_REFRESH.MR_REFRESH;
21 END;
22 /
AMD-00001 created Cube "NTGT_USER.FAITHFULNESS"
AMD-00001 created Measure "NTGT_USER.FAITHFULNESS.MONEY"
AMD-00001 created Measure "NTGT_USER.FAITHFULNESS.SHARES"
AMD-00001 created Measure "NTGT_USER.FAITHFULNESS.BUYCOUNT"
AMD-00006 added Cube Dimension "NTGT_USER.FAITHFULNESS.NTGT_USER.BUSTYPE"
AMD-00006 added Cube Dimension "NTGT_USER.FAITHFULNESS.NTGT_USER.FUND"
AMD-00006 added Cube Dimension "NTGT_USER.FAITHFULNESS.NTGT_USER.TIMES"
AMD-00006 added Cube Dimension "NTGT_USER.FAITHFULNESS.NTGT_USER.FUNDALIAS"
AMD-00100 not found: Dimension "NTGT_USER.CUSTREGION" ---这里看到这个维没有部署
解决办法:
根据你自己的模型实现方式,选择统一的部署方式:'Deploy to catalog' ,'Deploy Data Object Only ' or 'Deploy All'
然后重新部署一下相关维或立方即可