Chinaunix首页 | 论坛 | 博客
  • 博客访问: 92309999
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: Oracle

2008-04-18 10:30:14

 来源:hur.cn

  今天看到有一个朋友因为Move了一个系统表DEPENDENCY$,在没有Rebuild索引的情况下,重起,结果收到ORA-01502错误,无法启动.
  
  Thu Nov 17 01:55:30 2005
  Errors in file /dcdb/admin/hidc/udump/hidc_ora_56602.trc:
  ORA-00704: bootstrap process failure
  ORA-00604: error occurred at recursive level 1
  ORA-01502: index 'SYS.I_DEPENDENCY1' or partition of such index is in unusable state
  
  在这种情况下,最好的情况是拥有备份,能够从备份中恢复.如果没有备份就很麻烦了(本案例恰恰没有备份).
  
  和D.C.B.A讨论这个问题的时候,开始想到了3个办法:
  
  1.通过某种手段跳过索引检测
  
  事实证明在9i中这很难;而且这是在Bootstrap$的检测过程中发生的.
  
  2.通过BBED进行修复
  
  这种方法应该可行,但是会极其复杂小心.
  
  3.使用DUL或类DUL工具
  
  最后这种方法是万不得已.
  
  DCBA在跟进这个案例,参考:
  http://www.anysql.net/blog/p/movesystem.php
  
  但是我们应该记住,永远不要让你的处于这样的境地,这真的很危险.
  
  这一问题的根本原因在于,启动过程中,会进行如下验证:
  select owner#,name,namespace,remoteowner,linkname,
  p_timestamp,p_obj#, d_owner#, nvl(property,0),subname
  from dependency$,obj$ where d_obj#=:1 and p_obj#=obj#(+) order by order#
  
  这一验证会导致如下执行计划:
  STAT #9 id=1 cnt=1 pid=0 pos=1 obj=0 op='NESTED LOOPS (cr=6 r=3 w=0 time=694 us)'
  STAT #9 id=2 cnt=1 pid=1 pos=1 obj=18 op='TABLE BY INDEX ROWID OBJ#(18) (cr=3 r=0 w=0 time=104 us)'
  STAT #9 id=3 cnt=1 pid=2 pos=1 obj=36 op='INDEX UNIQUE SCAN OBJ#(36) (cr=2 r=0 w=0 time=64 us)'
  STAT #9 id=4 cnt=1 pid=1 pos=2 obj=22 op='TABLE ACCESS CLUSTER OBJ#(22) (cr=3 r=3 w=0 time=576 us)'
  STAT #9 id=5 cnt=1 pid=4 pos=1 obj=11 op='INDEX UNIQUE SCAN OBJ#(11) (cr=2 r=2 w=0 time=406 us)'
  
  这里的'INDEX UNIQUE SCAN OBJ#(36)"就导致了最后的错误:
  ORA-00704: bootstrap process failure
  ORA-00604: error occurred at recursive level 1
  ORA-01502: index 'SYS.I_DEPENDENCY1' or partition of such index is in unusable state
  EXEC #1:c=0,e=633371,p=39,cr=619,cu=1,mis=0,r=0,dep=0,og=2,tim=1105782888673612
  ERROR #1:err=1092 tim=1563018104
  
  可惜并不允许置所有索引于不顾,否则就有救了.
  
  套用一句名言:幸运的大致相同,不幸的却各有各的不幸.
阅读(261) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~