通過健康檢查讓你的Oracle數據庫遠離損壞
俗話說
甲骨文公司發布Oracle
所以
SQL> SELECT name
NAME I O DESCRIPTION
HM Test Check Y Y Check for HM Functionality
DB Structure Integrity Check N Y Checks integrity of all database files
Data Block Integrity Check N Y Checks integrity of a datafile block
Redo Integrity Check N Y Checks integrity of redo log content
Logical Block Check Y N Checks logical content of a block
Transaction Integrity Check N N Checks a transaction for corruptions
Undo Segment Integrity Check N N Checks integrity of an undo segment
All Control Files Check Y Y Checks all control files in the database
CF Member Check Y Y Checks a multiplexed copy of the control file
All Datafiles Check Y Y Check for all datafiles in the database
Single Datafile Check Y Y Checks a datafile
Log Group Check Y Y Checks all members of a log group
Log Group Member Check Y Y Checks a particular member of a log group
Archived Log Check Y Y Checks an archived log
Redo Revalidation Check Y Y Checks redo log content
IO Revalidation Check Y Y Checks file accessability
Block IO Revalidation Check Y Y Checks file accessability
Txn Revalidation Check Y N Revalidate corrupted txn
Failure Simulation Check Y Y Creates dummy failures
Dictionary Integrity Check N N Checks dictionary integrity
由於一些健康檢查需要額外的輸入參數
SELECT c
p
FROM v$hm_check_param p
WHERE p
ORDER BY c
我不知道我已經遭遇多少次字典問題
通過手動運行字典完整性檢查
BEGIN
DBMS_HM
END;
/
現在
由於DBMS_HM
adrci> show hm_run
ADR Home = /opt/app/oracle/diag/rdbms/db
*****************************************************
**********************************************************
HM RUN RECORD
**********************************************************
RUN_ID
RUN_NAME DICTIONARY_CHECK_
CHECK_NAME Dictionary Integrity Check
NAME_ID
MODE
START_TIME
RESUME_TIME
END_TIME
MODIFIED_TIME
TIMEOUT
FLAGS
STATUS
SRC_INCIDENT_ID
NUM_INCIDENTS
ERR_NUMBER
REPORT_FILE
這最顯著的信息
使用DBMS_HM包
SET LONG
SET LONGCHUNKSIZE
SET PAGESIZE
SET LINESIZE
SELECT DBMS_HM
使用ADRCI CREATE REPORT命令
CREATE REPORT hm_run DICTIONARY_CHECK_
When using the DBMS_HM package the output looks like:
當使用DBMS_HM包時輸出結果如下
DBMS_HM
Basic Run Information
Run Name : DICTIONARY_CHECK_
Run Id :
Check Name : Dictionary Integrity Check
Mode : MANUAL
Status : COMPLETED
Start Time :
End Time :
Error Encountered :
Source Incident Id :
Number of Incidents Created :
Input Paramters for the Run
TABLE_NAME=ALL_CORE_TABLES
CHECK_MASK=ALL
Run Findings And Recommendations
Finding
Finding Name : Dictionary Inconsistency
Finding ID :
Type : FAILURE
Status : OPEN
Priority : CRITICAL
Message : SQL dictionary health check: file$ pk
failed
Message : Damaged rowid is AAAAARAABAAAAByAAF
damage description available
Finding
Finding Name : Dictionary Inconsistency
Finding ID :
Type : FAILURE
Status : OPEN
Priority : CRITICAL
Message : SQL dictionary health check: dependency$
object DEPENDENCY$ failed
Message : Damaged rowid is AAAABnAABAAAOiHABI
damage description available
Finding
Finding Name : Dictionary Inconsistency
Finding ID :
Type : FAILURE
Status : OPEN
Priority : CRITICAL
Message : SQL dictionary health check: dependency$
object DEPENDENCY$ failed
Message : Damaged rowid is AAAABnAABAAAQXqAA
damage description available
運行後DBMS_HM包或ADRCI 的CREATE REPORT命令後
REPORT_FILE /opt/app/oracle/diag/rdbms/db
當使用ADRCI功能
show report hm_run DICTIONARY_CHECK_
不管用什麼方法
From:http://tw.wingwit.com/Article/program/Oracle/201311/18140.html