eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

« 新闻补白 - 蒙牛特仑苏 与 狂犬育苗 | Blog首页 | DBA警示录:存储故障的处理应当谨慎 »

ORA-07445 与 PL/SQL Developer 案例一则

前几天,又有一个客户的系统遇到了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;

历史上的今天...
    >> 2011-02-13文章:
    >> 2010-02-13文章:
    >> 2008-02-13文章:
    >> 2007-02-13文章:
    >> 2006-02-13文章:
           飘洋过海来看你
           如何解决Ora-00600 4194错误
    >> 2005-02-13文章:
           初始化参数-LOG_PARALLELISM

无觅

By eygle on 2009-02-13 13:42 | Comments (0) | Case | 2189 |


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com