67 DBMS_DICTIONARY_CHECK
DBMS_DICTIONARY_CHECK
は読取り専用の軽量PL/SQLパッケージ・プロシージャで、Oracle Databaseディクショナリの不整合を識別するのに役立ちます。
67.1 Oracle Databaseディクショナリ・チェックの概要
DBMS_DICTIONARY_CHECK
は、読取り専用の軽量PL/SQLパッケージ・プロシージャで、Oracle Databaseディクショナリ表の予期しないエントリまたはディクショナリ表間の無効な参照に現れるOracle Databaseディクショナリの不整合を識別するのに役立ちます。Oracle Databaseディクショナリの不整合が原因でプロセスが失敗し、場合によってはインスタンスがクラッシュする可能性があります。このような不整合は、内部エラーORA-00600
の対象となる可能性があります。DBMS_DICTIONARY_CHECK
は、このような不整合を識別するのに役立ち、場合によっては、問題を解決してそのようなデータベース障害を回避するためのガイド付きの修正を提供します。
ディクショナリ表内の予期しないエントリやディクショナリ表間の無効な参照には、次のようなものがあります。
OBJ$
にないLOBセグメントOBJ$
にないSOURCE$
のエントリOBJ$-PARTOBJ$
とTABPART$
の間の無効なデータ- 所有者のいないセグメント
seg$
にエントリがないマテリアライズド・セグメント- オブジェクト・エントリのないセグメント
recyclebin$
にないごみ箱オブジェクトControl Seq
が制限に近づいているかどうかのチェック
67.2 DBMS_DICTIONARY_CHECKの使用
すべてのチェックを実行するか、DBMS_DICTIONARY_CHECK
で定義されたクリティカル・チェックのみを実行するには、SYS
スキーマに接続し、SYS
ユーザーとして次のコマンドを実行します。
完全チェック
SQL> set serveroutput on size unlimited
SQL> execute dbms_dictionary_check.full
SQL> set serveroutput on size unlimited
SQL> EXECUTE dbms_dictionary_check.full(repair=>TRUE)
完全チェックの実行中に、オプションで、repair
オプションを使用して不整合を解決できます。有効な値: TRUE
|FALSE
デフォルト: FALSE
。
クリティカル・チェック
SQL> set serveroutput on size unlimited
SQL> execute dbms_dictionary_check.critical
必要に応じて、スプールをオンにして、出力をサーバー側のフラット・ファイルにリダイレクトします。デフォルトでは、SYS
スキーマを問い合せると、DBMS_DICTIONARY_CHECK
パッケージによってDICTCHECK.trc
という名前のトレース・ファイルが作成されます。
例: /<path>/diag/rdbms/<db_name>/<oracle_sid>/trace/<oracle_sid>_<ora>_<pid>_DICTCHECK.trc
。
- CRITICAL: ただちに修正する必要があります。
- FAIL: 優先的に解決する必要があります。
- WARN: 解決することをお薦めします。
- PASS: 問題ありません。
ノート:
どの場合でも、問題を報告する出力はすべて、Oracleサポートによってトリアージされ、処理が必要かどうかを確認する必要があります。
例67-1 完全チェックの実行
SQL> set serveroutput on size unlimited
SQL> execute dbms_dictionary_check.full
dbms_dictionary_check on 07-MAR-2023 03:17:48
----------------------------------------------
Catalog Version 21.0.0.0.0 (2300000000)
db_name: ORCL
Is CDB?: NO
Trace File: /oracle/log/diag/rdbms/orcl/orcl/trace/orcl_ora_2574906_DICTCHECK.trc
Catalog Fixed
Procedure Name Version Vs Release Timestamp Result
------------------------------ ... ---------- -- ---------- -------------- ------
.- OIDOnObjCol ... 2300000000 <= *All Rel* 03/07 03:17:48 PASS
.- LobNotInObj ... 2300000000 <= *All Rel* 03/07 03:17:48 PASS
.- SourceNotInObj ... 2300000000 <= *All Rel* 03/07 03:17:48 PASS
.- OversizedFiles ... 2300000000 <= *All Rel* 03/07 03:17:48 PASS
.- PoorDefaultStorage ... 2300000000 <= *All Rel* 03/07 03:17:48 PASS
.- PoorStorage ... 2300000000 <= *All Rel* 03/07 03:17:48 PASS
.- TabPartCountMismatch ... 2300000000 <= *All Rel* 03/07 03:17:49 PASS
.- TabComPartObj ... 2300000000 <= *All Rel* 03/07 03:17:49 PASS
.- Mview ... 2300000000 <= *All Rel* 03/07 03:17:49 PASS
.- ValidDir ... 2300000000 <= *All Rel* 03/07 03:17:49 PASS
.- DuplicateDataobj ... 2300000000 <= *All Rel* 03/07 03:17:49 PASS
.- ObjSyn ... 2300000000 <= *All Rel* 03/07 03:17:49 PASS
.- ObjSeq ... 2300000000 <= *All Rel* 03/07 03:17:49 PASS
.- UndoSeg ... 2300000000 <= *All Rel* 03/07 03:17:49 PASS
.- IndexSeg ... 2300000000 <= *All Rel* 03/07 03:17:49 PASS
.- IndexPartitionSeg ... 2300000000 <= *All Rel* 03/07 03:17:49 PASS
.- IndexSubPartitionSeg ... 2300000000 <= *All Rel* 03/07 03:17:49 PASS
.- TableSeg ... 2300000000 <= *All Rel* 03/07 03:17:49 FAIL
HCKE-0019: Orphaned TAB$ (no SEG$) (Doc ID 1360889.1)
ORPHAN TAB$: OBJ#=83241 DOBJ#=83241 TS=5 RFILE/BLOCK=5/11 TABLE=SYS.ORPHANSEG BOBJ#=
.- TablePartitionSeg ... 2300000000 <= *All Rel* 03/07 03:17:49 PASS
.- TableSubPartitionSeg ... 2300000000 <= *All Rel* 03/07 03:17:49 PASS
.- PartCol ... 2300000000 <= *All Rel* 03/07 03:17:49 PASS
.- ValidSeg ... 2300000000 <= *All Rel* 03/07 03:17:49 FAIL
HCKE-0023: Orphaned SEG$ Entry (Doc ID 1360934.1)
ORPHAN SEG$: SegType=LOB TS=5 RFILE/BLOCK=5/26
.- IndPartObj ... 2300000000 <= *All Rel* 03/07 03:17:49 PASS
.- DuplicateBlockUse ... 2300000000 <= *All Rel* 03/07 03:17:49 PASS
.- FetUet ... 2300000000 <= *All Rel* 03/07 03:17:49 PASS
.- Uet0Check ... 2300000000 <= *All Rel* 03/07 03:17:49 PASS
.- SeglessUET ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- ValidInd ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- ValidTab ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- IcolDepCnt ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- ObjIndDobj ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- TrgAfterUpgrade ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- ObjType0 ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- ValidOwner ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- StmtAuditOnCommit ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- PublicObjects ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- SegFreelist ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- ValidDepends ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- CheckDual ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- ObjectNames ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- ChkIotTs ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- NoSegmentIndex ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- NextObject ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- DroppedROTS ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- FilBlkZero ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- DbmsSchemaCopy ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- IdnseqObj ... 2300000000 > 1201000000 03/07 03:17:50 PASS
.- IdnseqSeq ... 2300000000 > 1201000000 03/07 03:17:50 PASS
.- ObjError ... 2300000000 > 1102000000 03/07 03:17:50 PASS
.- ObjNotLob ... 2300000000 <= *All Rel* 03/07 03:17:50 FAIL
HCKE-0049: OBJ$ LOB entry has no LOB$ or LOBFRAG$ entry (Doc ID 2125104.1)
OBJ$ LOB has no LOB$ entry: Obj=83243 Owner: SYS LOB Name: LOBC1
.- MaxControlfSeq ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- SegNotInDeferredStg ... 2300000000 > 1102000000 03/07 03:17:50 PASS
.- SystemNotRfile1 ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- DictOwnNonDefaultSYSTEM ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- ValidateTrigger ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- ObjNotTrigger ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
.- InvalidTSMaxSCN ... 2300000000 > 1202000000 03/07 03:17:50 CRITICAL
HCKE-0054: TS$ has Tablespace with invalid Maximum SCN (Doc ID 1360208.1)
TS$ has Tablespace with invalid Maximum SCN: TS#=5 Tablespace=HCHECK Online$=1
.- OBJRecycleBin ... 2300000000 <= *All Rel* 03/07 03:17:50 PASS
---------------------------------------
07-MAR-2023 03:17:50 Elapsed: 2 secs
---------------------------------------
Found 4 potential problem(s) and 0 warning(s)
Found 1 CRITICAL problem(s) needing attention
Contact Oracle Support with the output and trace file
to check if the above needs attention or not
BEGIN dbms_dictionary_check.full; END;
*
ERROR at line 1:
ORA-20000: dbms_dictionary_check found 1 critical issue(s). Trace file:
/oracle/log/diag/rdbms/orcl/orcl/trace/orcl_ora_2574906_DICTCHECK.trc
SQL>
例67-2 repairオプションを使用した完全チェックの実行
SQL> set serveroutput on size unlimited
SQL> EXECUTE dbms_dictionary_check.full(repair=>TRUE)
dbms_dictionary_check on 04-OCT-2023 01:35:37
----------------------------------------------
Catalog Version 23.0.0.0.0 (2300000000)
db_name: orcl
Is CDB?: NO
Trace File: /oracle/log/diag/rdbms/orcl/orcl/trace/orcl_ora_3831454_DICTCHECK.trc
Catalog Fixed
Procedure Name Version Vs Release Timestamp Result
------------------------------ ... ---------- -- ---------- -------------- ------
.- OIDOnObjCol ... 2300000000 <= *All Rel* 10/04 01:35:37 PASS
.- LobNotInObj ... 2300000000 <= *All Rel* 10/04 01:35:37 PASS
.- SourceNotInObj ... 2300000000 <= *All Rel* 10/04 01:35:38 FAIL
HCKE-0003: SOURCE$ for OBJ# not in OBJ$ (Doc ID 1360233.1)
SOURCE$ has 10 rows for 1 OBJ# values not in OBJ$
INCONSISTENCY REPAIRED - Check the trace file for repair details:
SourceNotInObj_Repair: DELETED 10 objects from SOURCE$ not found in OBJ$
.- OversizedFiles ... 2300000000 <= *All Rel* 10/04 01:35:38 PASS
.- PoorDefaultStorage ... 2300000000 <= *All Rel* 10/04 01:35:38 PASS
.- PoorStorage ... 2300000000 <= *All Rel* 10/04 01:35:38 PASS
.- TabPartCountMismatch ... 2300000000 <= *All Rel* 10/04 01:35:38 PASS
.- TabComPartObj ... 2300000000 <= *All Rel* 10/04 01:35:38 PASS
.- Mview ... 2300000000 <= *All Rel* 10/04 01:35:38 PASS
.- ValidDir ... 2300000000 <= *All Rel* 10/04 01:35:38 PASS
.- DuplicateDataobj ... 2300000000 <= *All Rel* 10/04 01:35:38 PASS
.- ObjSyn ... 2300000000 <= *All Rel* 10/04 01:35:39 PASS
.- ObjSeq ... 2300000000 <= *All Rel* 10/04 01:35:39 PASS
.- ValidateSeg ... 2300000000 <= *All Rel* 10/04 01:35:39 FAIL
HCKE-0023: Orphaned SEG$ Entry (Doc ID 1360934.1)
ORPHAN SEG$: SegType=DATA TS=5 RFILE/BLOCK=5/11 HWMINCR(DOBJ#)=73271
.- TableSeg ... 2300000000 <= *All Rel* 10/04 01:35:39 PASS
.- TablePartitionSeg ... 2300000000 <= *All Rel* 10/04 01:35:39 PASS
.- TableSubPartitionSeg ... 2300000000 <= *All Rel* 10/04 01:35:39 PASS
ORPHAN SEG$: SegType=DATA TS=5 RFILE/BLOCK=5/11
^ Segment entry repaired - Converted to TEMPORARY
INCONSISTENCY REPAIRED - Check the trace file for repair details:
ValidateSeg repaired 1 Orphan Seg$ entries
.- UndoSeg ... 2300000000 <= *All Rel* 10/04 01:35:39 PASS
...
---------------------------------------
04-OCT-2023 01:35:40 Elapsed: 3 secs
---------------------------------------
Found 3 potential problem(s) and 0 warning(s)
Repaired 11 item(s)
Contact Oracle Support with the output and trace file
to check if the above needs attention or not
BEGIN dbms_dictionary_check.full(repair=>TRUE); END;
*
ERROR at line 1:
ORA-20001: dbms_dictionary_check found 3 problem(s) and repaired 11 item(s). Trace file:
/oracle/log/diag/rdbms/orcl/orcl/trace/orcl_ora_3831454_DICTCHECK.trc
例67-3 クリティカル・チェックの実行
SQL> set serveroutput on size unlimited
SQL> execute dbms_dictionary_check.critical
dbms_dictionary_check on 07-MAR-2023 03:12:23
----------------------------------------------
Catalog Version 21.0.0.0.0 (2100000000)
db_name: ORCL
Is CDB?: NO
Trace File: /oracle/log/diag/rdbms/orcl/orcl/trace/orcl_ora_2574058_DICTCHECK.trc
Catalog Fixed
Procedure Name Version Vs Release Timestamp Result
------------------------------ ... ---------- -- ---------- -------------- ------
.- UndoSeg ... 2300000000 <= *All Rel* 03/07 03:12:23 PASS
.- MaxControlfSeq ... 2300000000 <= *All Rel* 03/07 03:12:23 PASS
.- InvalidTSMaxSCN ... 2300000000 > 1202000000 03/07 03:12:23 CRITICAL
HCKE-0054: TS$ has Tablespace with invalid Maximum SCN (Doc ID 1360208.1)
TS$ has Tablespace with invalid Maximum SCN: TS#=5 Tablespace=HCHECK Online$=1
---------------------------------------
07-MAR-2023 03:12:23 Elapsed: 0 secs
---------------------------------------
Found 1 potential problem(s) and 0 warning(s)
Found 1 CRITICAL problem(s) needing attention
Contact Oracle Support with the output and trace file
to check if the above needs attention or not
BEGIN dbms_dictionary_check.critical; END;
*
ERROR at line 1:
ORA-20000: dbms_dictionary_check found 1 critical issue(s). Trace file:
/oracle/log/diag/rdbms/orcl/orcl/trace/orcl_ora_2574058_DICTCHECK.trc
SQL>
67.3 DBMS_DICTIONARY_CHECKサブプログラムの要約
DBMS_DICTIONARY_CHECK
パッケージには、次のプロシージャが含まれています。
- LobNotInObj: LOBセグメントが
OBJ$
にないかどうかをチェックします(My Oracle Supportノート1360208.1) - OIDOnObjCol: オブジェクト・タイプ列が
OID$
にないかどうかをチェックします(My Oracle Supportノート1360268.1) - SourceNotInObj:
SOURCE$
のエントリがOBJ$
にないかどうかをチェックします(My Oracle Supportノート1360233.1)SourceNotInObj
プロシージャの実行中に、オプションで、repair
オプションを使用して不整合を解決できます。有効な値:TRUE
|FALSE
デフォルト:FALSE
。 - IndIndparMismatch: パーティション間の索引名の不一致をチェックします(My Oracle Supportノート1360285.1)
- InvCorrAudit: 無効な
AUDIT$
のエントリをチェックします(My Oracle Supportノート1360489.1) - OversizedFiles: サイズ超過したデータベース・ファイルをチェックします(My Oracle Supportノート1360490.1)
- PoorDefaultStorage: 表領域のデフォルト記憶域句をチェックします(My Oracle Supportノート1360493.1)
- PoorStorage: オブジェクトの記憶域句をチェックします(My Oracle Supportノート1360496.1)
- PartSubPartMismatch: 有効なパーティション・メソッドをチェックします(My Oracle Supportノート1360504.1)
- TabPartCountMismatch:
OBJ$-PARTOBJ$
とTABPART$
の間の無効なデータをチェックします(My Oracle Supportノート1360514.1) - TabComPartObj: コンポジット・パーティションに
OBJ$
の有効なエントリがあることをチェックします(My Oracle Supportノート1360515.1) - Mview: マテリアライズド・ビューの無効なエントリをチェックします(My Oracle Supportノート1360517.1)
- ValidDir: ディレクトリ・オブジェクトに有効なエントリがあることをチェックします(My Oracle Supportノート1360518.1)
- DuplicateDataobj: 重複セグメント
data_object_id
をチェックします(My Oracle Supportノート1360519.1) - ObjSyn: シノニムに
OBJ$
の有効なエントリがあることをチェックします(My Oracle Supportノート1360520.1) - ObjSeq: シーケンスに
OBJ$
の有効なエントリがあることをチェックします(My Oracle Supportノート1360524.1) - UndoSeg: UNDOセグメントに
SEG$
の有効なエントリがあることをチェックします(My Oracle Supportノート1360527.1) - IndexSeg: 索引セグメントに
SEG$
の有効なエントリがあることをチェックします(My Oracle Supportノート1360531.1) - IndexPartitionSeg: 索引パーティションに
SEG$
の有効なエントリがあることをチェックします(My Oracle Supportノート1360535.1) - IndexSubPartitionSeg: 索引サブパーティションに
SEG$
の有効なエントリがあることをチェックします(My Oracle Supportノート1360536.1) - TableSeg: 表に
SEG$
の有効なエントリがあることをチェックします(My Oracle Supportノート1360889.1) - TablePartitionSeg: 表パーティションに
SEG$
の有効なエントリがあることをチェックします(My Oracle Supportノート1360890.1) - TableSubPartitionSeg: 表サブパーティションに
SEG$
の有効なエントリがあることをチェックします(My Oracle Supportノート1360891.1) - PartCol: 列パーティションの有効なエントリをチェックします(My Oracle Supportノート1360892.1)
- ValidateSeg:
SEG$
のセグメントにその親のエントリがあることをチェックします(My Oracle Supportノート1360934.1)ValidateSeg
プロシージャの実行中に、オプションで、repair
オプションを使用して不整合を解決できます。有効な値:TRUE
|FALSE
デフォルト:FALSE
。 - IndPartObj: 索引パーティションに
OBJ$
のエントリがあることをチェックします(My Oracle Supportノート1360935.1) - DuplicateBlockUse: セグメント・ヘッダー・ブロックが1つのセグメントのみで使用されているかどうかをチェックします(My Oracle Supportノート1360880.1)
- FetUet: ディクショナリ管理表領域の有効な空き領域/使用済領域をチェックします(My Oracle Supportノート1360882.1)
- Uet0Check: ディクショナリ管理表領域の有効な最初のエクステントをチェックします(My Oracle Supportノート1360883.1)
- ExtentlessSeg: ディクショナリ管理表領域の
SEG$
/UET$
の不一致をチェックします(My Oracle Supportノート1360944.1) - SeglessUET: ディクショナリ管理表領域の
UET$
/SEG$
の不一致をチェックします(My Oracle Supportノート1360944.1) - ValidInd:
OBJ$
の索引に索引ディクショナリの対応するエントリがあることをチェックします(My Oracle Supportノート1360528.1) - ValidTab:
OBJ$
の表にTAB$
の対応するエントリがあることをチェックします(My Oracle Supportノート1360538.1) - IcolDepCnt:
ICOLDEP$
の有効なエントリをチェックします(My Oracle Supportノート1360938.1) - WarnIcolDep: 索引にADT (オブジェクト列)がないことをチェックします(My Oracle Supportノート1360939.1)
- ObjIndDobj:
OBJ$
とIND$
の間の索引data_object_idの不一致をチェックします(My Oracle Supportノート1360968.1) - TrgAfterUpgrade: トリガーの有効なエントリをチェックします(My Oracle Supportノート1361014.1)
- ObjType0:
OBJ$
に0より大きい有効なタイプがあることをチェックします(My Oracle Supportノート1361015.1) - ValidOwner:
OBJ$
のエントリに有効なユーザーIDがあることをチェックします(My Oracle Supportノート1361020.1) - StmtAuditOnCommit:
STMT_AUDIT_OPTION_MAP
の有効なエントリをチェックします(My Oracle Supportノート1361021.1) - PublicObjects: オブジェクトが
PUBLIC
によって所有されていないことをチェックします(My Oracle Supportノート1361022.1) - SegFreelist: LOBセグメントに有効な空きリスト・グループがあることをチェックします(My Oracle Supportノート1361023.1)
- ValidDepends: 有効な依存関係のタイムスタンプをチェックします(My Oracle Supportノート1361045.1)
- CheckDual: DUALの有効なエントリをチェックします(My Oracle Supportノート1361046.1)
- ObjectNames: オブジェクトの名前がスキーマ所有者と同じかどうかをチェックします(My Oracle Supportノート2363142.1)
- CboHiLo: ヒストグラムの有効なエントリをチェックします(My Oracle Supportノート1361047.1)
- ChkIotTs: IOTオブジェクトにセグメントがないことをチェックします(My Oracle Supportノート1361048.1)
- NoSegmentIndex:
NOSEGMENT
の索引をチェックします(My Oracle Supportノート1361049.1) - NextObject: 有効な
data_object_id
をチェックします(My Oracle Supportノート2124772.1) - DroppedROTS: 読取り専用表領域の有効なエントリをチェックします(My Oracle Supportノート2124774.1)
- FilBlkZero: データ・ブロック・アドレスがゼロかどうかをチェックします(My Oracle Supportノート2124783.1)
- DbmsSchemaCopy:
DBMS_SCHEMA_COPY
の無効な実行をチェックします(My Oracle Supportノート2124795.1) - IdnseqObj: アイデンティティ列に有効なオブジェクトがあることをチェックします(My Oracle Supportノート2124805.1)
- IdnseqSeq: シーケンスに有効なオブジェクトがあることをチェックします(My Oracle Supportノート2124787.1)
- ObjError: オブジェクト・エラーが有効であることをチェックします(My Oracle Supportノート2124788.1)
- ObjNotLob: LOBオブジェクトに
LOB$
のエントリがあることをチェックします(My Oracle Supportノート2125104.1) - MaxControlfSeq:
Control Seq
が制限に近づいているかどうかをチェックします(My Oracle Supportノート2128446.1) - SegNotInDeferredStg: 無効な遅延セグメントをチェックします(My Oracle Supportノート2298947.1)
- SystemNotRfile1: システム表領域に相対ファイル番号1があることをチェックします(My Oracle Supportノート2364065.1)
- DictOwnNonDefaultSYSTEM: ユーザーSYSおよびSYSTEMにデフォルトの表領域SYSTEMがあることをチェックします(My Oracle Supportノート2377270.1)
- ValidateTrigger: トリガーにその親の有効なエントリがあることをチェックします(My Oracle Supportノート2384373.1)
- ObjNotTrigger: オブジェクト・トリガーが
TRIGGER$
にないかどうかをチェックします(My Oracle Supportノート2384392.1) - WarningTSMaxSCN: 表領域内の公開されたSCNエントリをチェックします
- InvalidTSMaxSCN: 表領域内の無効なSCNエントリをチェックします(My Oracle Supportノート1360208.1)
- OBJRecycleBin:
OBJ$
内のごみ箱オブジェクトがRECYCLEBIN$
に存在することをチェックします(My Oracle Supportノート2902943.1) - LobSeg: LOBセグメントに
SEG$
の有効なエントリがあることをチェックします(My Oracle Supportノート2948392.1および2948408.1) - Critical: クリティカル・チェックのみを実行します
- Full: すべてのチェックを実行します
例67-4 repairオプションを指定したValidateSeg
SQL> EXECUTE dbms_dictionary_check.ValidateSeg(repair=>TRUE)
.- ValidateSeg ... 2300000000 <= *All Rel* 10/04 01:30:21 FAIL
HCKE-0023: Orphaned SEG$ Entry (Doc ID 1360934.1)
ORPHAN SEG$: SegType=DATA TS=5 RFILE/BLOCK=5/11 HWMINCR(DOBJ#)=73270
.- TableSeg ... 2300000000 <= *All Rel* 10/04 01:30:21 PASS
.- TablePartitionSeg ... 2300000000 <= *All Rel* 10/04 01:30:21 PASS
.- TableSubPartitionSeg ... 2300000000 <= *All Rel* 10/04 01:30:21 PASS
ORPHAN SEG$: SegType=DATA TS=5 RFILE/BLOCK=5/11
^ Segment entry repaired - Converted to TEMPORARY
INCONSISTENCY REPAIRED - Check the trace file for repair details:
ValidateSeg repaired 1 Orphan Seg$ entries
PL/SQL procedure successfully completed.
例67-5 repairオプションを指定したSourceNotInObj
SQL> EXECUTE dbms_dictionary_check.SourceNotInObj(repair=>TRUE)
dbms_dictionary_check on 04-OCT-2023 01:30:20
----------------------------------------------
Catalog Version 23.0.0.0.0 (2300000000)
db_name: orcl
Is CDB?: NO
Trace File: /oracle/log/diag/rdbms/orcl/orcl/trace/orcl_ora_3831239_DICTCHECK.trc
Catalog Fixed
Procedure Name Version Vs Release Timestamp Result
------------------------------ ... ---------- -- ---------- -------------- ------
.- SourceNotInObj ... 2300000000 <= *All Rel* 10/04 01:30:20 FAIL
HCKE-0003: SOURCE$ for OBJ# not in OBJ$ (Doc ID 1360233.1)
SOURCE$ has 10 rows for 1 OBJ# values not in OBJ$
INCONSISTENCY REPAIRED - Check the trace file for repair details:
SourceNotInObj_Repair: DELETED 10 objects from SOURCE$ not found in OBJ$
PL/SQL procedure successfully completed.