问题描述
有一个客户的系统遇到了PL/SQL Developer引起的Bug,而且又是ORA-07445的骇人错误。
最近曾经遇到一起Oracle 10.2.0.3中和PL/SQL Developer相关的Bug,参考链接:
http://www.eygle.com/archives/2009/02/ora_07445_kprball.html
这次的错误信息如下:
Mon Dec 8 19:12:16 2008 Errors in file /opt/oracle/admin/orcl/udump/orcl1_ora_19228.trc: ORA-07445: exception encountered: core dump [00000001022CEF08] [SIGSEGV] [Address not mapped to object] [0x000000010] [] [] Mon Dec 8 19:12:16 2008 Trace dumping is performing id=[cdmp_20081208191216] Mon Dec 8 20:03:28 2008 Errors in file /opt/oracle/admin/orcl/udump/orcl1_ora_25214.trc: ORA-07445: exception encountered: core dump [00000001022CEF08] [SIGSEGV] [Address not mapped to object] [0x000000010] [] [] Mon Dec 8 20:03:28 2008 Trace dumping is performing id=[cdmp_20081208200328] Mon Dec 8 20:03:54 2008 Errors in file /opt/oracle/admin/orcl/udump/orcl1_ora_25941.trc: ORA-07445: exception encountered: core dump [00000001022CEF08] [SIGSEGV] [Address not mapped to object] [0x000000010] [] [] Mon Dec 8 20:04:31 2008 Errors in file /opt/oracle/admin/orcl/udump/orcl1_ora_26610.trc: ORA-07445: exception encountered: core dump [00000001022CEF08] [SIGSEGV] [Address not mapped to object] [0x000000010] [] [] Tue Dec 9 09:43:56 2008 Errors in file /opt/oracle/admin/orcl/udump/orcl1_ora_11477.trc: ORA-07445: exception encountered: core dump [00000001022CEF08] [SIGSEGV] [Address not mapped to object] [0x000000010] [] []
专家解答
在跟踪文件中记录了一大段如下代码,这个错误不会引起数据库的故障,Metalink上认为这个PL/SQL Developer的问题,在新版本中应该得到修正。所以如果你遇到这个错误,可以考虑升级一下PL/SQL Developer软件:
*** SESSION ID:(610.38046) 2008-12-08 19:12:16.000 Exception signal: 11 (SIGSEGV), code: 1 (Address not mapped to object), addr: 0x10, PC: [0x1022cef08, 00000001022CEF08] *** 2008-12-08 19:12:16.009 ksedmp: internal or fatal error ORA-07445: exception encountered: core dump [00000001022CEF08] [SIGSEGV] [Address not mapped to object] [0x000000010] [] [] Current SQL statement for this session: declare t_owner varchar2(30); t_name varchar2(30); procedure check_mview is dummy integer; begin if :object_type = 'TABLE' then select 1 into dummy from sys.all_objects where owner = :object_owner and object_name = :object_name and object_type = 'MATERIALIZED VIEW' and rownum = 1; :object_type := 'MATERIALIZED VIEW'; end if; exception when others then null; end; begin :sub_object := null; if :deep != 0 then begin if :part2 is null then select constraint_type, owner, constraint_name into :object_type, :object_owner, :object_name from sys.all_constraints c where c.constraint_name = :part1 and c.owner = user and rownum = 1; else select constraint_type, owner, constraint_name, :part3 into :object_type, :object_owner, :object_name, :sub_object from sys.all_constraints c where c.constraint_name = :part2 and c.owner = :part1 and rownum = 1; end if; if :object_type = 'P' then :object_type := 'PRIMARY KEY'; end if; if :object_type = 'U' then :object_type := 'UNIQUE KEY'; end if; if :object_type = 'R' then :object_type := 'FOREIGN KEY'; end if; if :object_type = 'C' then :object_type := 'CHECK CONSTRAINT'; end if; return; exception when no_data_found then null; end; end if; :sub_object := :part2; if (:part2 is null) or (:part1 != user) then begin select object_type, user, :part1 into :object_type, :object_owner, :object_name from sys.all_objects where owner = user and object_name = :part1 and object_type in ('MATERIALIZED VIEW', 'TABLE', 'VIEW', 'SEQUENCE', 'PROCEDURE', 'FUNCTION', 'PACKAGE', 'TYPE', 'TRIGGER', 'SYNONYM') and rownum = 1; if :object_type = 'SYNONYM' then select s.table_owner, s.table_name into t_owner, t_name from sys.all_synonyms s where s.synonym_name = :part1 and s.owner = user and rownum = 1; select o.object_type, o.owner, o.object_name into :object_type, :object_owner, :object_name from sys.all_objects o where o.owner = t_owner and o.object_name = t_name and object_type in ('MATERIALIZED VIEW', 'TABLE', 'VIEW', 'SEQUENCE', 'PROCEDURE', 'FUNCTION', 'PACKAGE', 'TYPE', 'TRIGGER', 'SYNONYM') and rownum = 1; end if; :sub_object := :part2; if :part3 is not null then :sub_object := :sub_object || '.' || :part3; end if; check_mview; return; exception when no_data_found then null; end; end if; begin select s.table_owner, s.table_name into t_owner, t_name from sys.all_synonyms s where s.synonym_name = :part1 and s.owner = 'PUBLIC' and rownum = 1; select o.object_type, o.owner, o.object_name into :object_type, :object_owner, :object_name from sys.all_objects o where o.owner = t_owner and o.object_name = t_name and object_type in ('MATERIALIZED VIEW', 'TABLE', 'VIEW', 'SEQUENCE', 'PROCEDURE', 'FUNCTION', 'PACKAGE', 'TYPE', 'TRIGGER', 'SYNONYM') and rownum = 1; check_mview; return; exception when no_data_found then null; end; :sub_object := :part3; begin select o.object_type, o.owner, o.object_name into :object_type, :object_owner, :object_name from sys.all_objects o where o.owner = :part1 and o.object_name = :part2 and object_type in ('MATERIALIZED VIEW', 'TABLE', 'VIEW', 'SEQUENCE', 'PROCEDURE', 'FUNCTION', 'PACKAGE', 'TYPE', 'TRIGGER', 'SYNONYM') and rownum = 1; check_mview; return; exception when no_data_found then null; end; begin if :part2 is null and :part3 is null then select 'USER', null, :part1 into :object_type, :object_owner, :object_name from sys.all_users u where u.username = :part1 and rownum = 1; return; end if; exception when no_data_found then null; end; begin if :part2 is null and :part3 is null and :deep != 0 then select 'ROLE', null, :part1 into :object_type, :object_owner, :object_name from sys.session_roles r where r.role = :part1 and rownum = 1; return; end if; exception when no_data_found then null; end; :object_owner := null; :object_type := null; :object_name := null; :sub_object := null; end;
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。