ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 可重现的ora-00600的解决方法

可重现的ora-00600的解决方法

原创 Linux操作系统 作者:foolishceo 时间:2010-08-06 09:52:25 0 删除 编辑

上metalink上查

Troubleshoot an ORA-600 or ORA-7445 Error Using the Error Lookup Tool [ID 153788.1]

这里会给出oracle的600信息

如果这里解决不了问题,开10046 trace

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.8.0 - Production

sys@TEST>alter session set events '10046 trace name context forever, level 8';

Session altered.

sys@TEST>
sys@TEST>create table kktest102(id int);
create table kktest102(id int)
*
ERROR at line 1:
ORA-00600: internal error code, arguments: [15267], [6250], [], [], [], [], [], []

在udump目录下的trace文件里可以找到

 select obj#,type#,ctime,mtime,stime,status,dataobj#,flags,oid$, spare1, spare2
 from obj$ where owner#=:1 and name=:2 and namespace=:3 and remoteowner is null and linkname is null and subname is null
 
 
Cursor 2 (2a966b0390): CURBOUND  curiob: 2a966cf0f8
 curflg: 7 curpar: 0 curusr: 0 curses 922d4c50
 cursor name: select obj#,type#,ctime,mtime,stime,status,dataobj#,flags,oid$, spare1, spare2 from obj$ where owner#=:1 and name=:2 and namespace=:3 and remoteowner is null and linkname is null and subname is null
 child pin: 0, child lock: 941992b0, parent lock: 94199668
 xscflg: 201414a6, parent handle: 95f12080, xscfl2: 5000401
 bhp size: 1304/1720
 bind 0: dty=2 mxl=22(22) mal=00 scl=00 pre=00 acflg=08 oacfl2=3134643200000001 size=24 ffset=0
   bfp=2a966cfed8 bln=22 avl=02 flg=05
   value=1
 bind 1: dty=1 mxl=32(09) mal=00 scl=00 pre=00 acflg=18 oacfl2=3134643200000001 size=32 ffset=0
   bfp=2a966cf078 bln=32 avl=09 flg=05
   value="KKTEST102"
 bind 2: dty=2 mxl=22(22) mal=00 scl=00 pre=00 acflg=08 oacfl2=3134643200000001 size=24 ffset=0
   bfp=2a966cf040 bln=24 avl=02 flg=05
   value=1

组合成sql

到数据库里查了一下

sys@TEST>select obj#,type#,ctime,mtime,stime,status,dataobj#,flags,oid$, spare1, spare2
  2   from obj$ where owner#=1 and name='KKTEST102' and namespace=1 and remoteowner is null and linkname is null and subname is null;

no rows selected

这一步其实是oracle去obj$里去确认对象OWENER=#1(SYS账户)  下  KKTEST102是否已经存在。

在确认没有存在后,继续往下执行

继续查看dump文件

Cursor 3 (2a966b03e0): CURROW  curiob: 2a966cc8b0
 curflg: 7 curpar: 0 curusr: 0 curses 922d4c50
 cursor name: select o.owner#,o.name,o.namespace,o.remoteowner,o.linkname,o.subname,o.dataobj#,o.flags from obj$ o where o.obj#=:1
 child pin: 0, child lock: 9419b4b8, parent lock: 9419b540
 xscflg: 211414a6, parent handle: 95f202d0, xscfl2: 5000401
 bhp size: 992/1712
 bind 0: dty=2 mxl=22(22) mal=00 scl=00 pre=00 acflg=08 oacfl2=3134643200000001 size=24 ffset=0
   bfp=2a966ca5e8 bln=22 avl=03 flg=05
   value=6250

组合成sql

并到数据库里查询

sys@TEST>select o.owner#,o.name,o.namespace,o.remoteowner,o.linkname,o.subname,o.dataobj#,o.flags from obj$ o where o.obj#=6250;

    OWNER# NAME                            NAMESPACE REMOTEOWNER                    LINKNAME     SUBNAME                          DATAOBJ#      FLAGS
---------- ------------------------------ ---------- ------------------------------ -------------------------------------------------------------------------------------------------------------------------------- ------------------------------ ---------- ----------
         0 KKTEST100                               1  6250          0

在确认没有KKTEST102这个对象以后,oracle再去obj$里判断,obj#为6250的对象是否存在,结果是存在的,这也就是为什么KKTEST102无法创建成功的原因。

sys@TEST>select max(obj#) from obj$;

 MAX(OBJ#)
----------
      6250

所以我们应该让oracle为KKTEST102对象分配obj#为6251

那么到底是什么控制obj# 的产生呢?

实际上oracle控制新对象的obj#的产生,也是用sequence

sys@TEST>select obj#,dataobj# from obj$ where name='_NEXT_OBJECT';

      OBJ#   DATAOBJ#
---------- ----------
         1       6258

sequence cache为10,oracle内部计数到了6250  ,   但是6250因为某些原因被占用了。

所以这个时候可以重启数据库,让内部计数重新计数或者更新obj$表  obj#=1  的dataobj# 为6251。就可以了。 

sys@TEST>shutdown abort;
ORACLE instance shut down.
sys@TEST>startup;
ORACLE instance started.

Total System Global Area 1228899024 bytes
Fixed Size                   742096 bytes
Variable Size             620756992 bytes
Database Buffers          603979776 bytes
Redo Buffers                3420160 bytes
Database mounted.
Database opened.
sys@TEST>create table kktest102(id int);

Table created.

 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/7249368/viewspace-670417/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2010-08-04

  • 博文量
    1
  • 访问量
    2115