Oracle數(shù)據(jù)恢復:ORA-600 4097錯誤解決案例一則
作者:eygle | 【轉載時請以超鏈接形式標明文章出處和作者信息及本聲明】全國聯(lián)保
鏈接: winxp安裝
站內(nèi)相關文章|Related Articles 數(shù)據(jù)恢復
Oracle數(shù)據(jù)恢復:ORA-600 kdsgrp1錯誤解決案例內(nèi)存安裝設置
環(huán)境變量與ORA-00600 unable to load XDB library
參數(shù)_smon_internal_errlimit與數(shù)據(jù)庫恢復
ORA-600 17285 錯誤 與 PL/SQL Developer
Oracle數(shù)據(jù)恢復:斷電導致的ORA-600 6006錯誤
在客戶數(shù)據(jù)庫恢復過程中,遇到ORA-600 4097號錯誤,這個錯誤是比較少見的.
在Oracle進行延遲塊清除時,會去查詢回滾段頭,以確認事務狀態(tài),然而,由于一些損壞或強制性恢復手段的采取,獲得的回滾段信息來自與未來,超前于當前數(shù)據(jù)庫狀態(tài).這樣就出現(xiàn)了4097號錯誤.
這個錯誤明確的由于事務清除和回滾段問題導致.
在觀察以下錯誤時,我們注意到一個重要的信息:
Non-fatal internal error happenned while SMON was doing logging scn->time mapping.
具體內(nèi)容如下:
Tue Jul 12 09:26:09 2011
Errors in file /oracle/socl/admin/bdump/socl_smon_909326.trc:
ORA-00600: internal error code, arguments: [4097], [], [], [], [], [], [], []
Tue Jul 12 09:26:10 2011
Non-fatal internal error happenned while SMON was doing logging scn->time mapping.
SMON encountered 1 out of maximum 100 non-fatal internal errors.
Tue Jul 12 09:31:12 2011
Errors in file /oracle/socl/admin/bdump/socl_smon_909326.trc:
ORA-00600: internal error code, arguments: [4097], [], [], [], [], [], [], []
Tue Jul 12 09:31:13 2011
Non-fatal internal error happenned while SMON was doing logging scn->time mapping.
SMON encountered 2 out of maximum 100 non-fatal internal errors.
我們知道數(shù)據(jù)庫中scn->time的映射關系是由smon_scn_time表來維護的:
rem
rem create the scn<->time tracking table that smon will maintain
rem as a circular queue - notice that we populate the entire
rem table with at least 144000 entries (enough for 5 days).
rem
rem -"thread" is for backward compatibility and is always 0
rem -"orig_thread" is for upgrade/downgrade
rem - scn_wrp, scn_bas, and time_dp are for backward compatibility
rem and not queried by the ktf layer.
rem
create cluster smon_scn_to_time (
thread number /* thread, compatibility */
)
/
create index smon_scn_to_time_idx on cluster smon_scn_to_time
/
create table smon_scn_time (
thread number, /* thread, compatibility */
time_mp number, /* time this recent scn represents */
time_dp date, /* time as date, compatibility */
scn_wrp number, /* scn.wrp, compatibility */
scn_bas number, /* scn.bas, compatibility */
num_mappings number,
tim_scn_map raw(1200),
scn number default 0, /* scn */
orig_thread number default 0 /* for downgrade */
) cluster smon_scn_to_time (thread)
/
create unique index smon_scn_time_tim_idx on smon_scn_time(time_mp)
/
create unique index smon_scn_time_scn_idx on smon_scn_time(scn)
/
這其中的數(shù)據(jù)并不重要,可以安全清除.隨后數(shù)據(jù)庫會繼續(xù)自動向該表記錄映射信息.
不能直接truncate 表 smon_scn_time :
soclrac01:oracle:[/oracle/socl/admin/bdump]#sqlplus "/ as sysdba"
SQL*Plus: Release 10.2.0.4.0 - Production on Tue Jul 12 09:41:09 2011
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select count(*) from smon_scn_time;
COUNT(*)
----------
1743
SQL> truncate table smon_scn_time;
truncate table smon_scn_time
*
ERROR at line 1:
ORA-03292: Table to be truncated is part of a cluster
ORA-03292提示該表是Cluster的一部分.
我們嘗試刪除數(shù)據(jù),發(fā)現(xiàn)存在錯誤,索引和數(shù)據(jù)不一致:
SQL> delete from smon_scn_time ;
delete from smon_scn_time