如果SMON 不能及时清理,在操作时就会报ORA-08104的错误。
在Oracle10gR2中可以使用dbms_repair.online_index_clean手工清理这些信息,在Oracle 9i下,需要打Bug 3805539 后才可以使用该工具。
手工处理的步骤如下:
(1)先查看ind$ flags 标志,如果不正确,就减去512.
sql>update ind$ set flags=flags-512 where obj#=
(2)drop journal table,这个步骤可能会报资源忙,因为有大量的日志正在插入,可以反复重试一下。
sql>drop table
注意:
这个步骤不能反,如果先删除sys_journal_
官网关于dbms_repair.online_index_clean 的说明:
ONLINE_INDEX_CLEAN Function
This function performs a manual cleanup of failed or interrupted online index builds or rebuilds. This action is also performed periodically by SMON, regardless of user-initiated cleanup.
This function returns TRUE if all indexes specified were cleaned up and FALSE if one or more indexes could not be cleaned up.
Syntax
DBMS_REPAIR.ONLINE_INDEX_CLEAN (
object_id IN BINARY_INTEGER DEFAULT ALL_INDEX_ID,
wait_for_lock IN BINARY_INTEGER DEFAULT LOCK_WAIT)
RETURN BOOLEAN;
Parameters
因此在做rebuild index online的时候,一定要在开始和结束阶段观察系统中是否有长事务的存储,对于并发量较大的系统,最严重的后果,可能在这两个关键点导致数据库产生大量锁等待,系统负载飙升,甚至宕机。