- 最后登录
- 2014-5-21
- 在线时间
- 33 小时
- 威望
- 0
- 金钱
- 126
- 注册时间
- 2012-7-21
- 阅读权限
- 10
- 帖子
- 39
- 精华
- 0
- 积分
- 0
- UID
- 636
|
1#
发表于 2012-12-4 15:27:40
|
查看: 4525 |
回复: 4
我同时在相同配置的两台机器上创建了同样的物化视图,另一台是可以的,在这台主机的时候报错。
请帮忙查一下原因。
DB info:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for IBM/AIX RISC System/6000: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production |
创建物化视图脚本如下 :
create materialized view mv_TD_S_SEND_TPL refresh fast on demand
next sysdate+1/1440
as
select SMS_CODE,
SEND_TABLE,
PRIORITY_LEVEL,
SMS_CONTENT,
NOTE,
CHAN_ID,
SMS_KIND_CODE,
SMS_TYPE_CODE,
FORCE_START_TIME,
FORCE_END_TIME,
SMS_NET_TAG,
EXT1,
EXT2
from td_s_send_tpl@lk_cswwjk;
|
报错:
ORA-00604: 递归 SQL 级别 1 出现错误
ORA-20000: Trigger xdb_installation_trigger does not support object creation of type SNAPSHOT
ORA-06512: 在 line 36
10046事件出来后看到有如下抛出错误的一段代码:
DECLARE
sql_text varchar2(200);
val number;
BEGIN
if (dictionary_obj_owner != 'XDB') then
if (dictionary_obj_type = 'FUNCTION' or
dictionary_obj_type = 'INDEX' or
dictionary_obj_type = 'PACKAGE' or
dictionary_obj_type = 'PACKAGE BODY' or
dictionary_obj_type = 'PROCEDURE' or
dictionary_obj_type = 'SYNONYM' or
dictionary_obj_type = 'TABLE' or
dictionary_obj_type = 'TABLESPACE' or
dictionary_obj_type = 'TYPE' or
dictionary_obj_type = 'VIEW' or
dictionary_obj_type = 'USER' or
dictionary_obj_type = 'TYPE BODY' or
dictionary_obj_type = 'BODY' or
dictionary_obj_type = 'TRIGGER' or
dictionary_obj_type = 'SEQUENCE'
)then
if (dictionary_obj_type != 'PACKAGE BODY'
) then
sql_text := 'select count(*) from ALL_OBJECTS where owner = :1 and object_name = :2 and object_type = :3';
execute immediate sql_text into val using dictionary_obj_owner, dictionary_obj_name, dictionary_obj_type;
if (val = 0) then
sql_text := 'select count(*) from dropped_xdb_instll_tab where owner = :1 and object_name = :2 and object_type = :3';
execute immediate sql_text into val using dictionary_obj_owner, dictionary_obj_name, dictionary_obj_type;
if (val = 0) then
insert into xdb_installation_tab values
(dictionary_obj_owner, dictionary_obj_name, dictionary_obj_type);
end if;
end if;
end if;
else
raise_application_error(-20000, 'Trigger xdb_installation_trigger does not support object creation of type '||dictionary_obj_type);
end if;
end if;
end;
END OF STMT |
|
|