欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

强制OPEN数据库后遭遇ORA-08102故障的处理方法

程序员文章站 2023-12-25 20:52:33
...

用隐含参数强制OPEN数据库后会有很多遗留问题,如:需重建UNDO表空间,此外还会伴随有ORA-08102错误,刚才做破坏online日志实验的

用隐含参数强制OPEN数据库后会有很多遗留问题,如:需重建UNDO表空间,此外还会伴随有ORA-08102错误

刚才做破坏online日志实验的时候采用加隐含参数强制打开过数据库,之后alert日志就一直会报ORA-08102
Wed Jun 24 13:56:24 2015
Errors in file /u01/app/Oracle/admin/ora10g/bdump/ora10g_j000_4737.trc:
ORA-00604: error occurred at recursive SQL level 1
ORA-08102: index key not found, obj# 239, file 1, block 1674 (2)
ORA-12012: error on auto execute of job 1
ORA-08102: index key not found, obj# 239, file 1, block 1674 (2)

--查看obj# 239的对象
SYS@ora10g> set line 130 pages 130
SYS@ora10g> col object_name form a15
SYS@ora10g> col owner for a10
SYS@ora10g> select owner,object_name,object_id,object_type from dba_objects where object_id=239;

OWNER OBJECT_NAME OBJECT_ID OBJECT_TYPE
---------- --------------- ---------- -------------------
SYS I_JOB_NEXT 239 INDEX

--查看I_JOB_NEXT这个索引属于哪个表
SYS@ora10g> select owner,index_name,table_name from dba_indexes where index_name='I_JOB_NEXT';

OWNER INDEX_NAME TABLE_NAME
---------- ------------------------------ ------------------------------
SYS I_JOB_NEXT JOB$

--查看I_JOB_NEXT这个索引创建再JOB$表的哪个列上
SYS@ora10g> col index_name for a10;
SYS@ora10g> col index_owner for a10
SYS@ora10g> col table_name for a10
SYS@ora10g> col column_name for a15
SYS@ora10g> select INDEX_OWNER,INDEX_NAME,TABLE_NAME,COLUMN_NAME from dba_ind_columns where INDEX_NAME='I_JOB_NEXT';

INDEX_OWNE INDEX_NAME TABLE_NAME COLUMN_NAME
---------- ---------- ---------- ---------------
SYS I_JOB_NEXT JOB$ NEXT_DATE

根据metalink上的文章:

ORA-08102: TRYING TO MANIPULATE A JOB IN DBA_JOBS [ID 1036858.6]

Solution Description:
=====================

You need to recreate the inex I_JOB_NEXT.

Script "$ORACLE_HOME/rdbms/admin/cat7103.sql" creates the I_JOB_NEXT:

Drop and recreate this index.

connect sys/
drop index i_job_next;
create index i_job_next on job$ (next_date)

Note: alter index I_JOB_NEXT rebuild;

Will not fix the problem.

重建索引是没有用的,必须先删除,,再重新创建

1.先删除索引i_job_next

SYS@ora10g> drop index i_job_next;

Index dropped.

2重建索引i_job_next;

SYS@ora10g> create index i_job_next on job$ (next_date);

Index created.

重建索引后,问题解决。所以,在没有必要的情况下,不要轻易去用隐含参数_allow_resetlogs_corruption=true去强制打开数据库,有隐患,如果不知道处理方法,仍然会对数据库产生影响。

上一篇:

下一篇: