中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Oracle 健康監控器(Health Monitor)

發布時間:2020-07-07 21:38:53 來源:網絡 閱讀:696 作者:bin321 欄目:關系型數據庫

健康監控器(Health Monitor)
ORACLE 11G 中引入了免費的數據庫健康監控器,通過DBMS_HM程序包來完成。

檢查項目:
1.DB結構完整性檢查

2.數據塊及完整性檢查

3.中做日志完整性檢查

4.Undo段完整性檢查

5.事物完整性檢查

6.數據字典完整性檢查

SQL> select name,description from v$hm_check;
NAME                           DESCRIPTION
------------------------------ -------------------------------------------------
HM Test Check                  Check for HM Functionality
DB Structure Integrity Check   Checks integrity of all database files
Data Block Integrity Check     Checks integrity of a datafile block
Redo Integrity Check           Checks integrity of redo log content
Logical Block Check            Checks logical content of a block
Transaction Integrity Check    Checks a transaction for corruptions
Undo Segment Integrity Check   Checks integrity of an undo segment
All Control Files Check        Checks all control files in the database
CF Member Check                Checks a multiplexed copy of the control file
All Datafiles Check            Check for all datafiles in the database
NAME                           DESCRIPTION
------------------------------ -------------------------------------------------
Single Datafile Check          Checks a datafile
Log Group Check                Checks all members of a log group
Log Group Member Check         Checks a particular member of a log group
Archived Log Check             Checks an archived log
Redo Revalidation Check        Checks redo log content
IO Revalidation Check          Checks file accessability
Block IO Revalidation Check    Checks file accessability
Txn Revalidation Check         Revalidate corrupted txn
Failure Simulation Check       Creates dummy failures
Dictionary Integrity Check     Checks dictionary integrity
21 rows selected.



PROCEDURE RUN_CHECK
 Argument Name                  Type                    In/Out Default?
 ------------------------------ ----------------------- ------ --------
 CHECK_NAME                     VARCHAR2                IN
 RUN_NAME                       VARCHAR2                IN     DEFAULT
 TIMEOUT                        NUMBER                  IN     DEFAULT
 INPUT_PARAMS                   VARCHAR2                IN     DEFAULT
 
 
 
.check_name:數據庫檢查名,這是一個強制參數必須被指定。可以在視圖v$hm_check中查詢到該參數的值。共21個值。
.run_name:可選參數,指定一個檢查名。
.timeout:可選參數,可以設置老化時間。
.params:輸入參數,用于控制檢查的執行。可以在視圖v$hm_check_param視圖中查看。
以下是一個檢查的例子:
SQL>exec dbms_hm.run_check('Dictionary Integrity Check','HM_TEST');


這個健康檢查會存儲報告到ADR數據庫實例的home目錄中。通過adrci的show hm_run命令可以顯示這些信息:
adrci> show hm_run


.......
**********************************************************
HM RUN RECORD 2766
**********************************************************
   RUN_ID                        55361
   RUN_NAME                      HM_RUN_55361
   CHECK_NAME                    DB Structure Integrity Check
   NAME_ID                       2
   MODE                          2
   START_TIME                    2015-09-28 08:58:30.714167 +08:00
   RESUME_TIME                   <NULL>
   END_TIME                      2015-09-28 08:58:30.742168 +08:00
   MODIFIED_TIME                 2015-09-28 08:58:30.742168 +08:00
   TIMEOUT                       0
   FLAGS                         0
   STATUS                        5
   SRC_INCIDENT_ID               0
   NUM_INCIDENTS                 0
   ERR_NUMBER                    0
   REPORT_FILE                   <NULL>

**********************************************************
HM RUN RECORD 2767
**********************************************************
   RUN_ID                        55381
   RUN_NAME                      HM_RUN_55381
   CHECK_NAME                    DB Structure Integrity Check
   NAME_ID                       2
   MODE                          2
   START_TIME                    2015-09-28 08:59:30.209094 +08:00
   RESUME_TIME                   <NULL>
   END_TIME                      2015-09-28 08:59:30.241902 +08:00
   MODIFIED_TIME                 2015-09-28 08:59:30.241902 +08:00
   TIMEOUT                       0
   FLAGS                         0
   STATUS                        5
   SRC_INCIDENT_ID               0
   NUM_INCIDENTS                 0
   ERR_NUMBER                    0
   REPORT_FILE                   <NULL>



adrci> show report hm_run testrun1
DIA-48614: HM run with name [testrun1] not found





網上其他人的例子:
adrci> show report hm_run testrun1
 
Data Block Check
Multiple corrupted blocks
datafile 2 contains corrupt blocks
tablespace SYSAUX is unavailable
block 66578 in datafile 2 is corrupt

adrci>
上面的報告顯示數據文件2上有壞塊,該文件屬于sysaux表空間。
所有的健康檢查報告存儲在v$hm_run視圖中,你也可以通過dbms_hm包來獲取報告:
SQL> /

NAME                             CHECK_NAME                       RUN_MODE STATUS
-------------------------------- -------------------------------- -------- -----------
HM_RUN_21                        DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_41                        DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_61                        DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_81                        DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_101                       DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_121                       DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_141                       DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_161                       DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_181                       DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_201                       DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_221                       DB Structure Integrity Check     REACTIVE COMPLETED

NAME                             CHECK_NAME                       RUN_MODE STATUS
-------------------------------- -------------------------------- -------- -----------
HM_RUN_241                       DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_261                       DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_281                       DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_301                       DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_321                       DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_341                       DB Structure Integrity Check     REACTIVE COMPLETED
.....
HM_RUN_55701                     DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_55721                     DB Structure Integrity Check     REACTIVE COMPLETED

NAME                             CHECK_NAME                       RUN_MODE STATUS
-------------------------------- -------------------------------- -------- -----------
HM_RUN_55741                     DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_55761                     DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_55781                     DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_55801                     DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_55821                     DB Structure Integrity Check     REACTIVE COMPLETED
HM_RUN_55841                     DB Structure Integrity Check     REACTIVE COMPLETED
my_run                           Dictionary Integrity Check       MANUAL   COMPLETED
HM_TEST                          Dictionary Integrity Check       MANUAL   COMPLETED
HM_RUN_1                         DB Structure Integrity Check     REACTIVE COMPLETED


my_run和HM_TEST就是我自己手動調用的。





可以查看剛剛檢查的
SQL> set long 100000
SQL> set longchunksize 1000
SQL> set pagesize 1000
SQL> set linesize 512
SQL> select DBMS_HM.GET_RUN_REPORT('HM_TEST') FROM DUAL;

DBMS_HM.GET_RUN_REPORT('HM_TEST')
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Basic Run Information
 Run Name                     : HM_TEST
 Run Id                       : 55901
 Check Name                   : Dictionary Integrity Check
 Mode                         : MANUAL
 Status                       : COMPLETED
 Start Time                   : 2015-10-15 18:17:00.890101 +08:00
 End Time                     : 2015-10-15 18:17:01.349346 +08:00
 Error Encountered            : 0
 Source Incident Id           : 0
 Number of Incidents Created  : 0

Input Paramters for the Run
 TABLE_NAME=ALL_CORE_TABLES
 CHECK_MASK=ALL

Run Findings And Recommendations

    

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

乐业县| 文昌市| 富顺县| 饶阳县| 睢宁县| 醴陵市| 克东县| 泰顺县| 晋江市| 枣强县| 安多县| 睢宁县| 临高县| 阿拉善右旗| 焦作市| 潼关县| 灵丘县| 炎陵县| 双牌县| 荔浦县| 泸溪县| 常德市| 黄梅县| 黄山市| 砀山县| 天祝| 高淳县| 柘城县| 多伦县| 玉屏| 田林县| 兴隆县| 荥经县| 昔阳县| 西昌市| 高邑县| 禹城市| 盐亭县| 舒兰市| 金溪县| 广宁县|