Oracle 数据库存储结构健康检查
ParnassusData 诗檀软件
Senior Product Management Director
Maclean Liu
古希腊的Delphi(世界中心),屹立着Parnassus
Mount(诗檀山),山上有一座阿波罗神庙,庙中住着
女祭司(Oracle)
Oracle 数据库存储结构健康检查 常见手段
• 11g以前Hcheck脚本检测数据字典完整性、一致性
• 11g以后Health Monitor Checks ,DBMS_HM DBKH、KTUD
• Log Scanner 日志扫描
• ASM Health Checker
• Etc
• hcmon - Health Check Monitor
• dbping - DBping Monitor
• logscan - Log Scanner Monitor
• ParnassusData recovery managerHM
• ORACLE 健康监控设计文档HM_INV.doc
• http://docs.oracle.com/cd/B28359_01/server.111/b28310/diag0
07.htm#ADMIN11273
Hcheck脚本
• 一个纯粹的SQL脚本
• 其输出如OPRHAN TAB$、TABPART$
• hcheck.sql 2013年3月最后一次更新
• 本质上是hcheck package
• 典型的查询如下:
11g Health Monitor Checks
• Dbkh DBK Health monitor main layer、 KTU
Diagnosability etc
– Checks for dictionary consistency
– Checks for data corruptions
– Checks for undo/redo corruptions
– Checks for memory corruptions and fragmentation issues
– Checks for RAC (global cache and global enqueues) issues
– Checks for Shared cursors (unusual growth of child
cursors)
11g Health Monitor Checks
• DB Structure Integrity Check
• Data Block Integrity Check
• Redo Integrity Check
• Transaction Integrity Check
• Undo Segment Integrity Check
• Dictionary Integrity Check
Asm health check
• kfhm.c - Kernel Files Health Monitor Checker functions
• Checkers in 11.2
• Allocation failure due to OutOfSpace errors
• Mount failure due to MissingDisks
• Add/Online disk failure due to ClusterwideVisibility
issues
• FileDrop fails
• Mount failure due to InsufficientDisks
• Mount failure due to TooManyOfflineDisks
字典检测
• prvtsqtk.sql - Package for building SQL
Toolkit Checker Meta-data
• The Component for these checks will be
DICTIONARY with a sub component of
CORE_DICTIONARY
• Single row checks will be named
<object_name>_single_row_check
• Cross Row checks will be named
<object_name>_cross_row_check
• Relationship checks will be named
<object_name>_relationship_check
字典检测
• Dictionary Integrity Check—This check examines the
integrity of core dictionary objects, such as tab$ and col$.
It performs the following operations:
– Verifies the contents of dictionary entries for each dictionary
object.
– Performs a cross-row level check, which verifies that logical
constraints on rows in the dictionary are enforced.
– Performs an object relationship check, which verifies that parent-
child relationships between dictionary objects are enforced.
• The Dictionary Integrity Check operates on the following
dictionary objects:
• tab$, clu$, fet$, uet$, seg$, undo$, ts$, file$, obj$, ind$,
icol$, col$, user$, con$, cdef$, ccol$, bootstrap$, objauth
$, ugroup$, tsq$, syn$, view$,typed_view$, superobj$, seq$,
lob$, coltype$, subcoltype$, ntab$, refcon$, opqtype$, depen
dency$, access$, viewcon$, icoldep$, dual$, sysauth$,objpriv
$, defrole$, and ecol$.
其他检测
• krbb0.h - Kernel Recovery Backup/restore Backup
private declarations Design Specification for
Transaction Layer Diagnosability 11gR1
• ktud.h - KTU Diagnosability undo
• kcidr.h - Kernal Cache Intelligent Data Repair
Header
• dbkstk.c - Database Kernel Sql ToolKit
我们要做的
• Dictionary 字典检测 -- 比较清晰
• ASM检测 --比较清晰
• Undo、Redo、transaction 技术上复杂,是否考虑
做?
Thank You
www.parnassusdata.com
+86 13764045638

PRM DUL Oracle Database Health Check

  • 1.
  • 2.
  • 3.
    Oracle 数据库存储结构健康检查 常见手段 •11g以前Hcheck脚本检测数据字典完整性、一致性 • 11g以后Health Monitor Checks ,DBMS_HM DBKH、KTUD • Log Scanner 日志扫描 • ASM Health Checker • Etc • hcmon - Health Check Monitor • dbping - DBping Monitor • logscan - Log Scanner Monitor • ParnassusData recovery managerHM • ORACLE 健康监控设计文档HM_INV.doc • http://docs.oracle.com/cd/B28359_01/server.111/b28310/diag0 07.htm#ADMIN11273
  • 4.
    Hcheck脚本 • 一个纯粹的SQL脚本 • 其输出如OPRHANTAB$、TABPART$ • hcheck.sql 2013年3月最后一次更新 • 本质上是hcheck package • 典型的查询如下:
  • 5.
    11g Health MonitorChecks • Dbkh DBK Health monitor main layer、 KTU Diagnosability etc – Checks for dictionary consistency – Checks for data corruptions – Checks for undo/redo corruptions – Checks for memory corruptions and fragmentation issues – Checks for RAC (global cache and global enqueues) issues – Checks for Shared cursors (unusual growth of child cursors)
  • 6.
    11g Health MonitorChecks • DB Structure Integrity Check • Data Block Integrity Check • Redo Integrity Check • Transaction Integrity Check • Undo Segment Integrity Check • Dictionary Integrity Check
  • 7.
    Asm health check •kfhm.c - Kernel Files Health Monitor Checker functions • Checkers in 11.2 • Allocation failure due to OutOfSpace errors • Mount failure due to MissingDisks • Add/Online disk failure due to ClusterwideVisibility issues • FileDrop fails • Mount failure due to InsufficientDisks • Mount failure due to TooManyOfflineDisks
  • 8.
    字典检测 • prvtsqtk.sql -Package for building SQL Toolkit Checker Meta-data • The Component for these checks will be DICTIONARY with a sub component of CORE_DICTIONARY • Single row checks will be named <object_name>_single_row_check • Cross Row checks will be named <object_name>_cross_row_check • Relationship checks will be named <object_name>_relationship_check
  • 9.
    字典检测 • Dictionary IntegrityCheck—This check examines the integrity of core dictionary objects, such as tab$ and col$. It performs the following operations: – Verifies the contents of dictionary entries for each dictionary object. – Performs a cross-row level check, which verifies that logical constraints on rows in the dictionary are enforced. – Performs an object relationship check, which verifies that parent- child relationships between dictionary objects are enforced. • The Dictionary Integrity Check operates on the following dictionary objects: • tab$, clu$, fet$, uet$, seg$, undo$, ts$, file$, obj$, ind$, icol$, col$, user$, con$, cdef$, ccol$, bootstrap$, objauth $, ugroup$, tsq$, syn$, view$,typed_view$, superobj$, seq$, lob$, coltype$, subcoltype$, ntab$, refcon$, opqtype$, depen dency$, access$, viewcon$, icoldep$, dual$, sysauth$,objpriv $, defrole$, and ecol$.
  • 10.
    其他检测 • krbb0.h -Kernel Recovery Backup/restore Backup private declarations Design Specification for Transaction Layer Diagnosability 11gR1 • ktud.h - KTU Diagnosability undo • kcidr.h - Kernal Cache Intelligent Data Repair Header • dbkstk.c - Database Kernel Sql ToolKit
  • 11.
    我们要做的 • Dictionary 字典检测-- 比较清晰 • ASM检测 --比较清晰 • Undo、Redo、transaction 技术上复杂,是否考虑 做?
  • 12.