بررسی صحت Data Dictionary در Oracle Database 23C به وسیله DBMS_HCHECK
مقدمه :
یکی از موارد مهم در شرح شغل راهبر پایگاه داده کنترل کردن عدم وجود مشکل در Data Dictionary می باشد که خود می توان نشان دهند مشکلات احتمالی و حتی علت برخی مشکلات در سطح پایگاه داده اوراکل باشد.
اوراکل در Oracle Database 23C خود این قابلیت را به عنوان یک امکان معرفی کرده است. البته که قبلا این امکان به عنوان یک اسکریپت وجود داشت که بعد از دانلود می توانستید از آن استفاده کنید. (Doc ID 136697.1)
برخی از امکانات جدید در پایگاه داده اوراکل ۲۳C
در این امکان جدید دو حالت وجود دارد :
- DBMS_HCHECK.FULL
- DBMS_HCHECK.CRITICAL
در ادامه هر کدام از آنها را مورد بررسی قرار خواهیم داد.
DBMS_HCHECK.FULL
روش FULL همه بررسی ها را انجام می دهد و خروجی را روی صفحه نمایش می دهد و آن را در یک trace file ثبت می کند. میتوانیم آن را در سطح CDB و یا PDB اجرا کنیم.
–conn sys/SysPassword1@//localhost:1521/free as sysdba
conn sys/SysPassword1@//localhost:1521/freepdb1 as sysdba
SQL> set serveroutput on size unlimited
SQL> exec dbms_hcheck.full
dbms_hcheck on 26-JUL-2023 19:16:19
———————————————-
Catalog Version 23.0.0.0.0 (2300000000)
db_name: FREE
Is CDB?: YES CON_ID: 3 Container: FREEPDB1
Trace File: /opt/oracle/diag/rdbms/free/FREE/trace/FREE_ora_11866_HCHECK.trc
Catalog Fixed
Procedure Name Version Vs Release Timestamp
Result
—————————— … ———- — ———- ————–
——
.- OIDOnObjCol … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:19 PASS
.- LobNotInObj … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:19 PASS
.- SourceNotInObj … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:19 PASS
.- OversizedFiles … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:19 PASS
.- PoorDefaultStorage … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:19 PASS
.- PoorStorage … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:19 PASS
.- TabPartCountMismatch … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:19 PASS
.- TabComPartObj … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:19 PASS
.- Mview … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:19 PASS
.- ValidDir … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:19 PASS
.- DuplicateDataobj … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:19 PASS
.- ObjSyn … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- ObjSeq … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- UndoSeg … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- IndexSeg … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- IndexPartitionSeg … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- IndexSubPartitionSeg … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- TableSeg … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- TablePartitionSeg … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- TableSubPartitionSeg … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- PartCol … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- ValidSeg … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- IndPartObj … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- DuplicateBlockUse … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- FetUet … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- Uet0Check … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- SeglessUET … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- ValidInd … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- ValidTab … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- IcolDepCnt … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- ObjIndDobj … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- TrgAfterUpgrade … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- ObjType0 … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- ValidOwner … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- StmtAuditOnCommit … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- PublicObjects … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- SegFreelist … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- ValidDepends … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- CheckDual … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- ObjectNames … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- ChkIotTs … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- NoSegmentIndex … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- NextObject … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- DroppedROTS … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- FilBlkZero … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- DbmsSchemaCopy … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- IdnseqObj … ۲۳۰۰۰۰۰۰۰۰ > ۱۲۰۱۰۰۰۰۰۰ ۰۷/۲۶ ۱۹:۱۶:۲۰ PASS
.- IdnseqSeq … ۲۳۰۰۰۰۰۰۰۰ > ۱۲۰۱۰۰۰۰۰۰ ۰۷/۲۶ ۱۹:۱۶:۲۰ PASS
.- ObjError … ۲۳۰۰۰۰۰۰۰۰ > ۱۱۰۲۰۰۰۰۰۰ ۰۷/۲۶ ۱۹:۱۶:۲۰ PASS
.- ObjNotLob … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- MaxControlfSeq … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- SegNotInDeferredStg … ۲۳۰۰۰۰۰۰۰۰ > ۱۱۰۲۰۰۰۰۰۰ ۰۷/۲۶ ۱۹:۱۶:۲۰ PASS
.- SystemNotRfile1 … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- DictOwnNonDefaultSYSTEM … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- ValidateTrigger … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- ObjNotTrigger … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
.- InvalidTSMaxSCN … ۲۳۰۰۰۰۰۰۰۰ > ۱۲۰۲۰۰۰۰۰۰ ۰۷/۲۶ ۱۹:۱۶:۲۰ PASS
.- OBJRecycleBin … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:16:20 PASS
—————————————
۲۶-JUL-2023 19:16:20 Elapsed: 1 secs
—————————————
Found 0 potential problem(s) and 0 warning(s)
Trace File: /opt/oracle/diag/rdbms/free/FREE/trace/FREE_ora_11866_HCHECK.trc
PL/SQL procedure successfully completed.
SQL>
DBMS_HCHECK.CRITICAL
روش CRITICAL فقط موارد critical را بررسی می کند و خروجی را روی صفحه نمایش می دهد و آن را در یک trace file ثبت می کند. میتوانیم آن را در سطح CDB و یا PDB اجرا کنیم.
–conn sys/SysPassword1@//localhost:1521/free as sysdba
conn sys/SysPassword1@//localhost:1521/freepdb1 as sysdba
SQL> set serveroutput on size unlimited
SQL> execute dbms_hcheck.critical
dbms_hcheck on 26-JUL-2023 19:19:29
———————————————-
Catalog Version 23.0.0.0.0 (2300000000)
db_name: FREE
Is CDB?: YES CON_ID: 3 Container: FREEPDB1
Trace File: /opt/oracle/diag/rdbms/free/FREE/trace/FREE_ora_11866_HCHECK.trc
Catalog Fixed
Procedure Name Version Vs Release Timestamp
Result
—————————— … ———- — ———- ————–
——
.- UndoSeg … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:19:29 PASS
.- MaxControlfSeq … ۲۳۰۰۰۰۰۰۰۰ <= *All Rel* 07/26 19:19:29 PASS
.- InvalidTSMaxSCN … ۲۳۰۰۰۰۰۰۰۰ > ۱۲۰۲۰۰۰۰۰۰ ۰۷/۲۶ ۱۹:۱۹:۲۹ PASS
—————————————
۲۶-JUL-2023 19:19:29 Elapsed: 0 secs
—————————————
Found 0 potential problem(s) and 0 warning(s)
Trace File: /opt/oracle/diag/rdbms/free/FREE/trace/FREE_ora_11866_HCHECK.trc
PL/SQL procedure successfully completed.
SQL<
دیدگاه خود را ثبت کنید
تمایل دارید در گفتگوها شرکت کنید؟در گفتگو ها شرکت کنید.