Bo's Oracle Station

查看: 1418|回复: 0

课程第37次

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2020-1-4 10:08:24 | 显示全部楼层 |阅读模式
  1. [oracle@station76 ~]$ rman target /

  2. Recovery Manager: Release 11.2.0.4.0 - Production on Sat Jan 4 03:33:56 2020

  3. Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

  4. connected to target database: ORCL (DBID=1554722616)

  5. RMAN> backup validate database;

  6. Starting backup at 2020-01-04:03:34:09
  7. using target database control file instead of recovery catalog
  8. allocated channel: ORA_SBT_TAPE_1
  9. channel ORA_SBT_TAPE_1: SID=15 device type=SBT_TAPE
  10. channel ORA_SBT_TAPE_1: Oracle Secure Backup
  11. allocated channel: ORA_SBT_TAPE_2
  12. channel ORA_SBT_TAPE_2: SID=204 device type=SBT_TAPE
  13. channel ORA_SBT_TAPE_2: Oracle Secure Backup
  14. channel ORA_SBT_TAPE_1: starting full datafile backup set
  15. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  16. input datafile file number=00001 name=+DATA/orcl/datafile/system.283.1026941797
  17. input datafile file number=00004 name=+DATA/orcl/datafile/users.265.1028025845
  18. input datafile file number=00003 name=+DATA/orcl/datafile/undotbs1.281.1026941797
  19. channel ORA_SBT_TAPE_2: starting full datafile backup set
  20. channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
  21. input datafile file number=00002 name=+DATA/orcl/datafile/sysaux.282.1026941797
  22. input datafile file number=00005 name=+DATA/orcl/datafile/tbstrans1.261.1027718433
  23. input datafile file number=00006 name=+DATA/orcl/datafile/tbstrans2.262.1027718497
  24. input datafile file number=00007 name=+DATA/orcl/datafile/tbslog.289.1028028559
  25. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:16
  26. List of Datafiles
  27. =================
  28. File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
  29. ---- ------ -------------- ------------ --------------- ----------
  30. 1    OK     0              14686        96010           1762376   
  31.   File Name: +DATA/orcl/datafile/system.283.1026941797
  32.   Block Type Blocks Failing Blocks Processed
  33.   ---------- -------------- ----------------
  34.   Data       0              64276           
  35.   Index      0              13250           
  36.   Other      0              3788            

  37. File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
  38. ---- ------ -------------- ------------ --------------- ----------
  39. 3    OK     0              1            14083           1762381   
  40.   File Name: +DATA/orcl/datafile/undotbs1.281.1026941797
  41.   Block Type Blocks Failing Blocks Processed
  42.   ---------- -------------- ----------------
  43.   Data       0              0               
  44.   Index      0              0               
  45.   Other      0              14079           

  46. File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
  47. ---- ------ -------------- ------------ --------------- ----------
  48. 4    OK     1              9            643             1760094   
  49.   File Name: +DATA/orcl/datafile/users.265.1028025845
  50.   Block Type Blocks Failing Blocks Processed
  51.   ---------- -------------- ----------------
  52.   Data       0              49              
  53.   Index      0              4               
  54.   Other      0              578            

  55. channel ORA_SBT_TAPE_1: starting full datafile backup set
  56. channel ORA_SBT_TAPE_1: specifying datafile(s) in backup set
  57. including current control file in backup set
  58. channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:16
  59. List of Datafiles
  60. =================
  61. File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
  62. ---- ------ -------------- ------------ --------------- ----------
  63. 2    OK     0              22887        89644           1762381   
  64.   File Name: +DATA/orcl/datafile/sysaux.282.1026941797
  65.   Block Type Blocks Failing Blocks Processed
  66.   ---------- -------------- ----------------
  67.   Data       0              20147           
  68.   Index      0              15138           
  69.   Other      0              31428           

  70. File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
  71. ---- ------ -------------- ------------ --------------- ----------
  72. 5    OK     0              1145         1280            1425175   
  73.   File Name: +DATA/orcl/datafile/tbstrans1.261.1027718433
  74.   Block Type Blocks Failing Blocks Processed
  75.   ---------- -------------- ----------------
  76.   Data       0              5               
  77.   Index      0              0               
  78.   Other      0              130            

  79. File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
  80. ---- ------ -------------- ------------ --------------- ----------
  81. 6    OK     0              1145         1280            1425175   
  82.   File Name: +DATA/orcl/datafile/tbstrans2.262.1027718497
  83.   Block Type Blocks Failing Blocks Processed
  84.   ---------- -------------- ----------------
  85.   Data       0              5               
  86.   Index      0              0               
  87.   Other      0              130            

  88. File Status Marked Corrupt Empty Blocks Blocks Examined High SCN
  89. ---- ------ -------------- ------------ --------------- ----------
  90. 7    OK     1              56           1281            1670938   
  91.   File Name: +DATA/orcl/datafile/tbslog.289.1028028559
  92.   Block Type Blocks Failing Blocks Processed
  93.   ---------- -------------- ----------------
  94.   Data       0              5               
  95.   Index      0              0               
  96.   Other      0              1219            

  97. channel ORA_SBT_TAPE_2: starting full datafile backup set
  98. channel ORA_SBT_TAPE_2: specifying datafile(s) in backup set
  99. including current SPFILE in backup set
  100. channel ORA_SBT_TAPE_1: backup set complete, elapsed time: 00:00:01
  101. List of Control File and SPFILE
  102. ===============================
  103. File Type    Status Blocks Failing Blocks Examined
  104. ------------ ------ -------------- ---------------
  105. Control File OK     0              600            
  106. channel ORA_SBT_TAPE_2: backup set complete, elapsed time: 00:00:01
  107. List of Control File and SPFILE
  108. ===============================
  109. File Type    Status Blocks Failing Blocks Examined
  110. ------------ ------ -------------- ---------------
  111. SPFILE       OK     0              2               
  112. Finished backup at 2020-01-04:03:34:57

  113. RMAN>
复制代码

  1. select  * from v$backup_corruption;

  2. select  * from v$database_block_corruption;

  3. select  * from v$copy_corruption;
复制代码
   FILE#BLOCK#BLOCKSCORRUPTION_CHANGE#CORRUPTION_TYPE
1419810CORRUPT
2713611670906NOLOGGING

Oracle默认由于参数原因,对逻辑坏块是“睁一只眼,闭一只眼的”:
  1. SQL> conn / as sysdba
  2. Connected.
  3. SQL> show parameter db_block_checking

  4. NAME                                 TYPE        VALUE
  5. ------------------------------------ ----------- ------------------------------
  6. db_block_checking                    string      FALSE
  7. SQL> show parameter ultra

  8. NAME                                 TYPE        VALUE
  9. ------------------------------------ ----------- ------------------------------
  10. db_ultra_safe                        string      OFF
  11. SQL>
复制代码
物理坏块是incident,是problem,也是failure:
  1. RMAN> list failure;

  2. List of Database Failures
  3. =========================

  4. Failure ID Priority Status    Time Detected       Summary
  5. ---------- -------- --------- ------------------- -------
  6. 3162       HIGH     OPEN      2019-12-26:10:47:58 Datafile 4: '+DATA/orcl/datafile/users.265.1028025845' contains one or more corrupt blocks

  7. RMAN>
复制代码
修复:

  1. RMAN> advise failure;

  2. List of Database Failures
  3. =========================

  4. Failure ID Priority Status    Time Detected       Summary
  5. ---------- -------- --------- ------------------- -------
  6. 3162       HIGH     OPEN      2019-12-26:10:47:58 Datafile 4: '+DATA/orcl/datafile/users.265.1028025845' contains one or more corrupt blocks

  7. analyzing automatic repair options; this may take some time
  8. allocated channel: ORA_DISK_1
  9. channel ORA_DISK_1: SID=143 device type=DISK
  10. allocated channel: ORA_DISK_2
  11. channel ORA_DISK_2: SID=137 device type=DISK
  12. allocated channel: ORA_DISK_3
  13. channel ORA_DISK_3: SID=73 device type=DISK
  14. allocated channel: ORA_DISK_4
  15. channel ORA_DISK_4: SID=19 device type=DISK
  16. allocated channel: ORA_DISK_5
  17. channel ORA_DISK_5: SID=79 device type=DISK
  18. allocated channel: ORA_DISK_6
  19. channel ORA_DISK_6: SID=130 device type=DISK
  20. allocated channel: ORA_DISK_7
  21. channel ORA_DISK_7: SID=202 device type=DISK
  22. allocated channel: ORA_DISK_8
  23. channel ORA_DISK_8: SID=14 device type=DISK
  24. using channel ORA_SBT_TAPE_1
  25. using channel ORA_SBT_TAPE_2
  26. analyzing automatic repair options complete

  27. Mandatory Manual Actions
  28. ========================
  29. no manual actions available

  30. Optional Manual Actions
  31. =======================
  32. no manual actions available

  33. Automated Repair Options
  34. ========================
  35. Option Repair Description
  36. ------ ------------------
  37. 1      Perform block media recovery of block 198 in file 4  
  38.   Strategy: The repair includes complete media recovery with no data loss
  39.   Repair script: /u01/app/oracle/diag/rdbms/orcl/orcl/hm/reco_144479743.hm

  40. RMAN> repair failure preview;

  41. Strategy: The repair includes complete media recovery with no data loss
  42. Repair script: /u01/app/oracle/diag/rdbms/orcl/orcl/hm/reco_144479743.hm

  43. contents of repair script:
  44.    # block media recovery
  45.    recover datafile 4 block 198;

  46. RMAN> recover  corruption list;

  47. Starting recover at 2020-01-04:03:56:23
  48. using channel ORA_DISK_1
  49. using channel ORA_DISK_2
  50. using channel ORA_DISK_3
  51. using channel ORA_DISK_4
  52. using channel ORA_DISK_5
  53. using channel ORA_DISK_6
  54. using channel ORA_DISK_7
  55. using channel ORA_DISK_8
  56. using channel ORA_SBT_TAPE_1
  57. using channel ORA_SBT_TAPE_2

  58. channel ORA_SBT_TAPE_1: restoring block(s)
  59. channel ORA_SBT_TAPE_1: specifying block(s) to restore from backup set
  60. restoring blocks of datafile 00004
  61. channel ORA_SBT_TAPE_1: reading from backup piece /home/oracle/clone1/4fukc5mu_1_1
  62. channel ORA_SBT_TAPE_1: piece handle=/home/oracle/clone1/4fukc5mu_1_1 tag=TAG20191226T043226
  63. channel ORA_SBT_TAPE_1: restored block(s) from backup piece 1
  64. channel ORA_SBT_TAPE_1: block restore complete, elapsed time: 00:00:01

  65. starting media recovery

  66. archived log for thread 1 with sequence 30 is already on disk as file +FRA/orcl/archivelog/2019_12_26/thread_1_seq_30.268.1028003569
  67. archived log for thread 1 with sequence 31 is already on disk as file +FRA/orcl/archivelog/2019_12_26/thread_1_seq_31.480.1028019613
  68. archived log for thread 1 with sequence 32 is already on disk as file +FRA/orcl/archivelog/2019_12_26/thread_1_seq_32.475.1028025907
  69. archived log for thread 1 with sequence 33 is already on disk as file +FRA/orcl/archivelog/2019_12_26/thread_1_seq_33.474.1028033415
  70. archived log for thread 1 with sequence 34 is already on disk as file +FRA/orcl/archivelog/2019_12_30/thread_1_seq_34.473.1028389949
  71. archived log for thread 1 with sequence 35 is already on disk as file +FRA/orcl/archivelog/2019_12_30/thread_1_seq_35.472.1028390449
  72. archived log for thread 1 with sequence 36 is already on disk as file +FRA/orcl/archivelog/2019_12_30/thread_1_seq_36.471.1028391747
  73. archived log for thread 1 with sequence 37 is already on disk as file +FRA/orcl/archivelog/2019_12_30/thread_1_seq_37.470.1028394159
  74. archived log for thread 1 with sequence 38 is already on disk as file +FRA/orcl/archivelog/2020_01_04/thread_1_seq_38.469.1028772761
  75. archived log for thread 1 with sequence 39 is already on disk as file +FRA/orcl/archivelog/2020_01_04/thread_1_seq_39.260.1028773409
  76. archived log for thread 1 with sequence 40 is already on disk as file +FRA/orcl/archivelog/2020_01_04/thread_1_seq_40.261.1028773605
  77. archived log for thread 1 with sequence 41 is already on disk as file +FRA/orcl/archivelog/2020_01_04/thread_1_seq_41.468.1028774577
  78. archived log for thread 1 with sequence 42 is already on disk as file +FRA/orcl/archivelog/2020_01_04/thread_1_seq_42.467.1028774605
  79. archived log for thread 1 with sequence 43 is already on disk as file +FRA/orcl/archivelog/2020_01_04/thread_1_seq_43.492.1028775637
  80. media recovery complete, elapsed time: 00:00:15
  81. Finished recover at 2020-01-04:03:56:46

  82. RMAN>
复制代码
修复完了之后,列表会自动清理:
  1. select  * from v$database_block_corruption;
复制代码

   FILE#BLOCK#BLOCKSCORRUPTION_CHANGE#CORRUPTION_TYPE
1713611670906NOLOGGING


访问Support Workbench的文本状态的“浏览器”:

  1. adrci> show alert -p "message_text like '%incident%'"

  2. ADR Home = /u01/app/oracle/product/11.2.0/dbhome_1/station76.example.com_orcl/sysman/emd/state/diag/rdbms/orcl/orcl:
  3. *************************************************************************
  4. Output the results to file: /tmp/alert_13566_1396_orcl_1.ado
  5. 2019-12-26 10:47:43.767000 +08:00
  6. Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_14511.trc  (incident=20777):
  7. ORA-01578: ORACLE data block corrupted (file # 4, block # 198)
  8. ORA-01110: data file 4: '+DATA/orcl/datafile/users.265.1028025845'
  9. Incident details in: /u01/app/oracle/diag/rdbms/orcl/orcl/incident/incdir_20777/orcl_ora_14511_i20777.trc
  10. 2019-12-26 10:47:56.324000 +08:00
  11. Dumping diagnostic data in directory=[cdmp_20191226104756], requested by (instance=1, osid=14511), summary=[incident=20777].
  12. 2019-12-26 10:54:47.623000 +08:00
  13. Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_14511.trc  (incident=20778):
  14. ORA-01578: ORACLE data block corrupted (file # 4, block # 198)
  15. ORA-01110: data file 4: '+DATA/orcl/datafile/users.265.1028025845'
  16. Incident details in: /u01/app/oracle/diag/rdbms/orcl/orcl/incident/incdir_20778/orcl_ora_14511_i20778.trc
  17. 2019-12-26 10:54:54.586000 +08:00
  18. Dumping diagnostic data in directory=[cdmp_20191226105454], requested by (instance=1, osid=14511), summary=[incident=20778].
  19. 2019-12-26 11:32:26.942000 +08:00
  20. Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_20827.trc  (incident=20593):
  21. ORA-01578: ORACLE data block corrupted (file # 7, block # 136)
  22. ORA-01110: data file 7: '+DATA/orcl/datafile/tbslog.289.1028028559'
  23. ORA-26040: Data block was loaded using the NOLOGGING option
  24. Incident details in: /u01/app/oracle/diag/rdbms/orcl/orcl/incident/incdir_20593/orcl_ora_20827_i20593.trc
  25. 2019-12-26 11:32:33.635000 +08:00
  26. Dumping diagnostic data in directory=[cdmp_20191226113233], requested by (instance=1, osid=20827), summary=[incident=20593].
  27. Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_20827.trc  (incident=20594):
  28. ORA-01578: ORACLE data block corrupted (file # 7, block # 136)
  29. ORA-01110: data file 7: '+DATA/orcl/datafile/tbslog.289.1028028559'
  30. ORA-26040: Data block was loaded using the NOLOGGING option
  31. Incident details in: /u01/app/oracle/diag/rdbms/orcl/orcl/incident/incdir_20594/orcl_ora_20827_i20594.trc
  32. 2019-12-26 11:32:40.600000 +08:00
  33. Dumping diagnostic data in directory=[cdmp_20191226113240], requested by (instance=1, osid=20827), summary=[incident=20594].
  34. 2019-12-26 11:42:24.690000 +08:00
  35. Errors in file /u01/app/oracle/diag/rdbms/orcl/orcl/trace/orcl_ora_20827.trc  (incident=20595):
  36. ORA-01578: ORACLE data block corrupted (file # 7, block # 136)
  37. ORA-01110: data file 7: '+DATA/orcl/datafile/tbslog.289.1028028559'
  38. ORA-26040: Data block was loaded using the NOLOGGING option
  39. Incident details in: /u01/app/oracle/diag/rdbms/orcl/orcl/incident/incdir_20595/orcl_ora_20827_i20595.trc
  40. 2019-12-26 11:42:31.087000 +08:00
  41. adrci>         
复制代码

ADRCI打MOS日志包的命令:
  1. [oracle@station76 ~]$ adrci

  2. ADRCI: Release 11.2.0.4.0 - Production on Sat Jan 4 04:03:38 2020

  3. Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

  4. ADR base = "/u01/app/oracle"
  5. adrci> help

  6. HELP [topic]
  7.    Available Topics:
  8.         CREATE REPORT
  9.         ECHO
  10.         EXIT
  11.         HELP
  12.         HOST
  13.         IPS
  14.         PURGE
  15.         RUN
  16.         SET BASE
  17.         SET BROWSER
  18.         SET CONTROL
  19.         SET ECHO
  20.         SET EDITOR
  21.         SET HOMES | HOME | HOMEPATH
  22.         SET TERMOUT
  23.         SHOW ALERT
  24.         SHOW BASE
  25.         SHOW CONTROL
  26.         SHOW HM_RUN
  27.         SHOW HOMES | HOME | HOMEPATH
  28.         SHOW INCDIR
  29.         SHOW INCIDENT
  30.         SHOW PROBLEM
  31.         SHOW REPORT
  32.         SHOW TRACEFILE
  33.         SPOOL

  34. There are other commands intended to be used directly by Oracle, type
  35. "HELP EXTENDED" to see the list

  36. adrci> help SHOW HOMES

  37.   Usage: SHOW HOMES | HOME | HOMEPATH
  38.           [-ALL | -base <base_str> | homepath_str1 ... ]

  39.   Purpose: Show the ADR homes in the current ADRCI session.

  40.   Options:
  41.     [-ALL]: If it is specified, the ADR homes under the current base
  42.     setting will be displayed.
  43.     [-base <base_str>]: It is for showing all the homes under <base_str>,
  44.     where <base_str> is a system-dependent directory path string.
  45.     <homepath_str1 ...>: The paths of the home, relative to the ADR base.

  46.   Examples:  
  47.     show homes -all
  48.     show homes -base /temp
  49.     show homes rdbms
  50.     show homes

  51. adrci> help SET HOMES

  52.   Usage:  SET HOMES | HOME| HOMEPATH <homepath_str1 homepath_str2 ...>

  53.   Purpose: Set the ADR homes to query in the current ADRCI session.

  54.   Arguments:
  55.     <homepath_str1 homepath_str2 ...>: The paths of the home,
  56.     relative to the ADR base.

  57.   Note:
  58.     The "diag" directory name can be omitted from the homepath_str.
  59.     If the specified path contains multiple homes, for instance, it is
  60.     set to the database ID which is running RAC. All of the ADR homes
  61.     corresponding to the instances of the database will be added to the
  62.     current ADRCI home settings.

  63.   Example:  
  64.     set homepath diag/rdbms/aime3/aime3 diag/rdbms/aime3/aime32
  65.     set homepath rdbms/aime3

  66. adrci>  set homepath diag/rdbms/orcl/orcl
  67. adrci> show incident

  68. ADR Home = /u01/app/oracle/diag/rdbms/orcl/orcl:
  69. *************************************************************************
  70. INCIDENT_ID          PROBLEM_KEY                                                 CREATE_TIME                              
  71. -------------------- ----------------------------------------------------------- ----------------------------------------
  72. 20777                ORA 1578                                                    2019-12-26 10:47:43.767000 +08:00      
  73. 20778                ORA 1578                                                    2019-12-26 10:54:47.623000 +08:00      
  74. 20593                ORA 1578                                                    2019-12-26 11:32:26.942000 +08:00      
  75. 20594                ORA 1578                                                    2019-12-26 11:32:34.373000 +08:00      
  76. 20595                ORA 1578                                                    2019-12-26 11:42:24.690000 +08:00      
  77. 30411                ORA 1578                                                    2020-01-04 02:13:13.865000 +08:00      
  78. 30412                ORA 1578                                                    2020-01-04 02:13:31.366000 +08:00      
  79. 30413                ORA 1578                                                    2020-01-04 02:13:48.196000 +08:00      
  80. 30414                ORA 1578                                                    2020-01-04 02:55:38.110000 +08:00      
  81. 30415                ORA 1578                                                    2020-01-04 02:56:13.541000 +08:00      
  82. 10 rows fetched

  83. adrci> show problem

  84. ADR Home = /u01/app/oracle/diag/rdbms/orcl/orcl:
  85. *************************************************************************
  86. PROBLEM_ID           PROBLEM_KEY                                                 LAST_INCIDENT        LASTINC_TIME                             
  87. -------------------- ----------------------------------------------------------- -------------------- ----------------------------------------
  88. 1                    ORA 1578                                                    30415                2020-01-04 02:56:13.541000 +08:00      
  89. 1 rows fetched

  90. adrci> help

  91. HELP [topic]
  92.    Available Topics:
  93.         CREATE REPORT
  94.         ECHO
  95.         EXIT
  96.         HELP
  97.         HOST
  98.         IPS
  99.         PURGE
  100.         RUN
  101.         SET BASE
  102.         SET BROWSER
  103.         SET CONTROL
  104.         SET ECHO
  105.         SET EDITOR
  106.         SET HOMES | HOME | HOMEPATH
  107.         SET TERMOUT
  108.         SHOW ALERT
  109.         SHOW BASE
  110.         SHOW CONTROL
  111.         SHOW HM_RUN
  112.         SHOW HOMES | HOME | HOMEPATH
  113.         SHOW INCDIR
  114.         SHOW INCIDENT
  115.         SHOW PROBLEM
  116.         SHOW REPORT
  117.         SHOW TRACEFILE
  118.         SPOOL

  119. There are other commands intended to be used directly by Oracle, type
  120. "HELP EXTENDED" to see the list

  121. adrci> help ips

  122. HELP IPS [topic]
  123.    Available Topics:
  124.         ADD
  125.         ADD FILE
  126.         ADD NEW INCIDENTS
  127.         CHECK REMOTE KEYS
  128.         COPY IN FILE
  129.         COPY OUT FILE
  130.         CREATE PACKAGE
  131.         DELETE PACKAGE
  132.         FINALIZE PACKAGE
  133.         GENERATE PACKAGE
  134.         GET MANIFEST
  135.         GET METADATA
  136.         GET REMOTE KEYS
  137.         PACK
  138.         REMOVE
  139.         REMOVE FILE
  140.         SET CONFIGURATION
  141.         SHOW CONFIGURATION
  142.         SHOW FILES
  143.         SHOW INCIDENTS
  144.         SHOW PACKAGE
  145.         UNPACK FILE
  146.         UNPACK PACKAGE
  147.         USE REMOTE KEYS
  148. adrci> ips SHOW PACKAGE
  149.    PACKAGE_ID             1
  150.    PACKAGE_NAME           ORA1578_20191226115728
  151.    PACKAGE_DESCRIPTION    ABCDEFG
  152.    DRIVING_PROBLEM        1
  153.    DRIVING_PROBLEM_KEY    ORA 1578
  154.    DRIVING_INCIDENT       20777
  155.    DRIVING_INCIDENT_TIME  2019-12-26 10:47:43.767000 +08:00
  156.    STATUS                 Generated (4)
  157.    CORRELATION_LEVEL      Typical (2)
  158.    PROBLEMS               1 main problems, 0 correlated problems
  159.    INCIDENTS              5 main incidents, 0 correlated incidents
  160.    INCLUDED_FILES         124

  161. adrci> help CREATE PACKAGE
  162. DIA-48433: Unknown help topic

  163. adrci> help ips CREATE PACKAGE

  164.   Usage:  IPS CREATE PACKAGE
  165.              [INCIDENT <incid> | PROBLEM <prob_id> | PROBLEMKEY <prob_key> |
  166.               SECONDS <seconds> | TIME <start_time> TO <end_time>]
  167.              [CORRELATE BASIC | TYPICAL | ALL]

  168.   Purpose: Create a package, and optionally select contents for the package.

  169.   Arguments:
  170.     <incid>:      ID of incident to use for selecting package contents.
  171.     <prob_id>:    ID of problem to use for selecting package contents.
  172.     <prob_key>:   Problem key to use for selecting package contents.
  173.     <seconds>:    Number of seconds before now for selecting package contents.
  174.     <start_time>: Start of time range to look for incidents in.
  175.     <end_time>:   End of time range to look for incidents in.

  176.   Options:
  177.     CORRELATE BASIC:   The package will include the incident dumps, and the
  178.                        incident process trace files.
  179.                        Additional incidents can be included automatically,
  180.                        if they share relevant correlation keys.
  181.     CORRELATE TYPICAL: The package will include the incident dumps, and all
  182.                        trace files that were modified in a time window around
  183.                        each incident.
  184.                        Additional incidents can be included automatically,
  185.                        if they share relevant correlation keys, or occurred
  186.                        in a time window around the main incidents.
  187.     CORRELATE ALL:     The package will include the incident dumps, and all
  188.                        trace files that were modified between the first
  189.                        selected incident and the last selected incident.
  190.                        Additional incidents can be included automatically,
  191.                        if they occurred in the same time range.

  192.   Notes:
  193.     If no package contents are specified (incident, problem, etc), an empty
  194.     package will be created. Files and incidents can be added later.
  195.     If no correlation level is specified, the default level is used.
  196.     The default is normally TYPICAL, but it can be changed using the command
  197.     IPS SET CONFIGURATION.

  198.   Example:
  199.     ips create package incident 861;
  200.     ips create package time '2006-12-31 23:59:59.00 -07:00' to
  201.         '2007-01-01 01:01:01.00 -07:00';

  202. adrci> IPS CREATE PACKAGE  PROBLEM 1
  203. Created package 2 based on problem id 1, correlation level typical
  204. adrci> help ips FINALIZE PACKAGE

  205.   Usage:  IPS FINALIZE PACKAGE <package_id>

  206.   Purpose: Get a package ready for shipping by automatically including
  207.            correlated contents.

  208.   Arguments:
  209.     <package_id>: ID of package to finalize.

  210.   Example:
  211.     ips finalize package 12

  212. adrci> ips show package   
  213.    PACKAGE_ID             1
  214.    PACKAGE_NAME           ORA1578_20191226115728
  215.    PACKAGE_DESCRIPTION    ABCDEFG
  216.    DRIVING_PROBLEM        1
  217.    DRIVING_PROBLEM_KEY    ORA 1578
  218.    DRIVING_INCIDENT       20777
  219.    DRIVING_INCIDENT_TIME  2019-12-26 10:47:43.767000 +08:00
  220.    STATUS                 Generated (4)
  221.    CORRELATION_LEVEL      Typical (2)
  222.    PROBLEMS               1 main problems, 0 correlated problems
  223.    INCIDENTS              5 main incidents, 0 correlated incidents
  224.    INCLUDED_FILES         124

  225.    PACKAGE_ID             2
  226.    PACKAGE_NAME           ORA1578_20200104040553
  227.    PACKAGE_DESCRIPTION   
  228.    DRIVING_PROBLEM        1
  229.    DRIVING_PROBLEM_KEY    ORA 1578
  230.    DRIVING_INCIDENT       20777
  231.    DRIVING_INCIDENT_TIME  2019-12-26 10:47:43.767000 +08:00
  232.    STATUS                 New (0)
  233.    CORRELATION_LEVEL      Typical (2)
  234.    PROBLEMS               1 main problems, 1 correlated problems
  235.    INCIDENTS              6 main incidents, 4 correlated incidents
  236.    INCLUDED_FILES         30

  237. adrci>  IPS FINALIZE PACKAGE 2;




  238. Finalized package 2
  239. adrci> adrci> adrci> adrci> adrci>
  240. adrci>
  241. adrci> ips show package
  242.    PACKAGE_ID             1
  243.    PACKAGE_NAME           ORA1578_20191226115728
  244.    PACKAGE_DESCRIPTION    ABCDEFG
  245.    DRIVING_PROBLEM        1
  246.    DRIVING_PROBLEM_KEY    ORA 1578
  247.    DRIVING_INCIDENT       20777
  248.    DRIVING_INCIDENT_TIME  2019-12-26 10:47:43.767000 +08:00
  249.    STATUS                 Generated (4)
  250.    CORRELATION_LEVEL      Typical (2)
  251.    PROBLEMS               1 main problems, 0 correlated problems
  252.    INCIDENTS              5 main incidents, 0 correlated incidents
  253.    INCLUDED_FILES         124

  254.    PACKAGE_ID             2
  255.    PACKAGE_NAME           ORA1578_20200104040553
  256.    PACKAGE_DESCRIPTION   
  257.    DRIVING_PROBLEM        1
  258.    DRIVING_PROBLEM_KEY    ORA 1578
  259.    DRIVING_INCIDENT       20777
  260.    DRIVING_INCIDENT_TIME  2019-12-26 10:47:43.767000 +08:00
  261.    STATUS                 Finalized (2)
  262.    CORRELATION_LEVEL      Typical (2)
  263.    PROBLEMS               1 main problems, 1 correlated problems
  264.    INCIDENTS              6 main incidents, 4 correlated incidents
  265.    INCLUDED_FILES         198

  266. adrci> ips GENERATE PACKAGE 2;
  267. Generated package 2 in file /home/oracle/ORA1578_20200104040553_COM_1.zip, mode complete
  268. adrci>
复制代码

QQ图片20191229214415.png


-----------------------------------
QQ图片20191229214415.png


  1. select  * from v$hm_check;

  2. begin
  3.   dbms_hm.run_check(check_name => 'Data Block Integrity Check',
  4.                       run_name =>  'MY2',
  5.                       input_params =>  'BLC_DF_NUM=7;BLC_BL_NUM=136');
  6. end;


  7. select dbms_hm.get_run_report('MY2') from dual;
复制代码
  1. **********************************************************
  2. HM RUN RECORD 27
  3. **********************************************************
  4.    RUN_ID                        3584
  5.    RUN_NAME                      MY2
  6.    CHECK_NAME                    Data Block Integrity Check
  7.    NAME_ID                       3
  8.    MODE                          0
  9.    START_TIME                    2020-01-04 04:27:42.668137 +08:00
  10.    RESUME_TIME                   <NULL>
  11.    END_TIME                      2020-01-04 04:27:43.392835 +08:00
  12.    MODIFIED_TIME                 2020-01-04 04:28:38.992340 +08:00
  13.    TIMEOUT                       0
  14.    FLAGS                         0
  15.    STATUS                        5
  16.    SRC_INCIDENT_ID               0
  17.    NUM_INCIDENTS                 0
  18.    ERR_NUMBER                    0
  19.    REPORT_FILE                   /u01/app/oracle/diag/rdbms/orcl/orcl/hm/HMREPORT_MY2.hm
  20. 27 rows fetched

  21. adrci> help

  22. HELP [topic]
  23.    Available Topics:
  24.         CREATE REPORT
  25.         ECHO
  26.         EXIT
  27.         HELP
  28.         HOST
  29.         IPS
  30.         PURGE
  31.         RUN
  32.         SET BASE
  33.         SET BROWSER
  34.         SET CONTROL
  35.         SET ECHO
  36.         SET EDITOR
  37.         SET HOMES | HOME | HOMEPATH
  38.         SET TERMOUT
  39.         SHOW ALERT
  40.         SHOW BASE
  41.         SHOW CONTROL
  42.         SHOW HM_RUN
  43.         SHOW HOMES | HOME | HOMEPATH
  44.         SHOW INCDIR
  45.         SHOW INCIDENT
  46.         SHOW PROBLEM
  47.         SHOW REPORT
  48.         SHOW TRACEFILE
  49.         SPOOL

  50. There are other commands intended to be used directly by Oracle, type
  51. "HELP EXTENDED" to see the list

  52. adrci> help SHOW REPORT

  53.   Usage:  SHOW REPORT <report_type> <report_id>

  54.   Purpose: Show a report for the specified report type and ID.
  55.            Currently we only support report type of hm_run.

  56.   Arguments:
  57.     <report_type>: The type of the requested report.
  58.     <report_id>  : The requested report ID.

  59.   Notes:
  60.     If currently there is no browser set, the report contents will be
  61.     displayed through ADRCI channels (terminal or spool file). To get
  62.     the report displayed through some browser, use command " set browser".
  63.     For example:  
  64.          "set browser mozilla"

  65.   Example:  
  66.     show report hm_run <hm_run_name>

  67. adrci> show report hm_run MY2
  68. <?xml version="1.0" encoding="US-ASCII"?>
  69. <HM-REPORT REPORT_ID="MY2">
  70.     <TITLE>HM Report: MY2</TITLE>
  71.     <RUN_INFO>
  72.         <CHECK_NAME>Data Block Integrity Check</CHECK_NAME>
  73.         <RUN_ID>3584</RUN_ID>
  74.         <RUN_NAME>MY2</RUN_NAME>
  75.         <RUN_MODE>MANUAL</RUN_MODE>
  76.         <RUN_STATUS>COMPLETED</RUN_STATUS>
  77.         <RUN_ERROR_NUM>0</RUN_ERROR_NUM>
  78.         <SOURCE_INCIDENT_ID>0</SOURCE_INCIDENT_ID>
  79.         <NUM_INCIDENTS_CREATED>0</NUM_INCIDENTS_CREATED>
  80.         <RUN_START_TIME>2020-01-04 04:27:42.668137 +08:00</RUN_START_TIME>
  81.         <RUN_END_TIME>2020-01-04 04:27:43.392835 +08:00</RUN_END_TIME>
  82.     </RUN_INFO>
  83.     <RUN_PARAMETERS>
  84.         <RUN_PARAMETER>BLC_DF_NUM=7</RUN_PARAMETER>
  85.         <RUN_PARAMETER>BLC_BL_NUM=136</RUN_PARAMETER>
  86.     </RUN_PARAMETERS>
  87.     <RUN-FINDINGS/>
  88. </HM-REPORT>
  89. adrci>
复制代码



回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-5-9 06:24 , Processed in 0.042913 second(s), 27 queries .

快速回复 返回顶部 返回列表