- 浏览: 11782606 次
- 性别:
- 来自: 深圳
文章分类
最新评论
-
笨蛋咯:
获取不到信息?
C#枚举硬件设备 -
guokaiwhu:
能把plan的数据结构图画出来,博主的耐心和细致令人佩服。
PostgreSQL服务过程中的那些事二:Pg服务进程处理简单查询五:规划成plantree -
gao807877817:
学习
BitmapFactory.Options详解 -
GB654:
楼主,我想问一下,如何在创建PPT时插入备注信息,虽然可以解析 ...
java转换ppt,ppt转成图片,获取备注,获取文本 -
jpsb:
多谢 ,不过我照搬你的sql查不到,去掉utl_raw.cas ...
关于oracle中clob字段查询的问题
Running Health Checks&…
Running Health Checks with Health Monitor
This section describes the Health Monitor and includes instructions on how to use it. The following topics are covered:
About Health Monitor
Beginning with Release 11g, Oracle Database includes a framework called Health Monitor for running diagnostic checks on the database.
About Health Monitor Checks
Health Monitor checks (also known as checkers, health checks, or checks) examine various layers and components of the database. Health checks detect file corruptions, physical and logical block corruptions, undo and redo corruptions, data dictionary corruptions, and more. The health checks generate reports of their findings and, in many cases, recommendations for resolving problems. Health checks can be run in two ways:
-
Reactive—The fault diagnosability infrastructure can run health checks automatically in response to a critical error.
-
Manual—As a DBA, you can manually run health checks using either the
DBMS_HM
PL/SQL package or the Enterprise Manager interface. You can run checkers on a regular basis if desired, or Oracle Support may ask you to run a checker while working with you on a service request.
Health Monitor checks store findings, recommendations, and other information in the Automatic Diagnostic Repository (ADR).
Health checks can run in two modes:
-
DB-online mode means the check can be run while the database is open (that is, in
OPEN
mode orMOUNT
mode). -
DB-offline mode means the check can be run when the instance is available but the database itself is closed (that is, in
NOMOUNT
mode).
All the health checks can be run in DB-online mode. Only the Redo Integrity Check and the DB Structure Integrity Check can be used in DB-offline mode.
See Also:
"Automatic Diagnostic Repository (ADR)"Types of Health Checks
Health monitor runs the following checks:
-
DB Structure Integrity Check—This check verifies the integrity of database files and reports failures if these files are inaccessible, corrupt or inconsistent. If the database is in mount or open mode, this check examines the log files and datafiles listed in the control file. If the database is in
NOMOUNT
mode, only the control file is checked. -
Data Block Integrity Check—This check detects disk image block corruptions such as checksum failures, head/tail mismatch, and logical inconsistencies within the block. Most corruptions can be repaired using Block Media Recovery. Corrupted block information is also captured in the
V$DATABASE_BLOCK_CORRUPTION
view. This check does not detect inter-block or inter-segment corruption. -
Redo Integrity Check—This check scans the contents of the redo log for accessibility and corruption, as well as the archive logs, if available. The Redo Integrity Check reports failures such as archive log or redo corruption.
-
Undo Segment Integrity Check—This check finds logical undo corruptions. After locating an undo corruption, this check uses PMON and SMON to try to recover the corrupted transaction. If this recovery fails, then Health Monitor stores information about the corruption in
V$CORRUPT_XID_LIST
. Most undo corruptions can be resolved by forcing a commit. -
Transaction Integrity Check—This check is identical to the Undo Segment Integrity Check except that it checks only one specific transaction.
-
Dictionary Integrity Check—This check examines the integrity of core dictionary objects, such as
tab$
andcol$
. 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$
,dependency$
,access$
,viewcon$
,icoldep$
,dual$
,sysauth$
,objpriv$
,defrole$
, andecol$
. -
Running Health Checks Manually
Health Monitor provides two ways to run health checks manually:
-
By using the
DBMS_HM
PL/SQL package -
By using the Enterprise Manager interface, found on the Checkers subpage of the Advisor Central page
Running Health Checks Using the DBMS_HM PL/SQL Package
The DBMS_HM
procedure for running a health check is
called RUN_CHECK
. To call RUN_CHECK
,
supply the name of the check and a name for the run, as
follows:
BEGIN DBMS_HM.RUN_CHECK('Dictionary Integrity Check', 'my_run'); END; /
To obtain a list of health check names, run the following query:
SELECT name FROM v$hm_check WHERE internal_check='N'; NAME ---------------------------------------------------------------- DB Structure Integrity Check Data Block Integrity Check Redo Integrity Check Transaction Integrity Check Undo Segment Integrity Check Dictionary Integrity Check
Most health checks accept input parameters. You can view
parameter names and descriptions with the
V$HM_CHECK_PARAM
view. Some parameters are mandatory
while others are optional. If optional parameters are omitted,
defaults are used. The following query displays parameter
information for all health checks:
SELECT c.name check_name, p.name parameter_name, p.type, p.default_value, p.description FROM v$hm_check_param p, v$hm_check c WHERE p.check_id = c.id and c.internal_check = 'N' ORDER BY c.name;
Input parameters are passed in the input_params
argument as name/value pairs separated by semicolons (;). The
following example illustrates how to pass the transaction ID as a
parameter to the Transaction Integrity Check:
BEGIN DBMS_HM.RUN_CHECK ( check_name => 'Transaction Integrity Check', run_name => 'my_run', input_params => 'TXN_ID=7.33.2'); END; /
See Also:
-
Oracle Database PL/SQL Packages and Types Reference for more examples of using
DBMS_HM
.
Running Health Checks Using Enterprise Manager
Enterprise Manager provides an interface for running Health Monitor checkers.
To run a Health Monitor Checker using Enterprise Manager:
-
On the Database Home page, in the Related Links section, click Advisor Central.
-
Click Checkers to view the Checkers subpage.
-
In the Checkers section, click the checker you want to run.
-
Enter values for input parameters or, for optional parameters, leave them blank to accept the defaults.
-
Click Run, confirm your parameters, and click Run again.
Viewing Checker Reports
After a checker has run, you can view a
report of its execution. The report contains findings,
recommendations, and other information. You can view reports using
Enterprise Manager, the ADRCI utility, or the DBMS_HM
PL/SQL package. The following table indicates the report formats
available with each viewing method.
Enterprise Manager | HTML |
DBMS_HM PL/SQL package |
HTML, XML, and text |
ADRCI utility | XML |
Results of checker runs (findings, recommendations, and other
information) are stored in the ADR, but reports are not generated
immediately. When you request a report with the
DBMS_HM
PL/SQL package or with Enterprise Manager, if
the report does not yet exist, it is first generated from the
checker run data in the ADR, stored as a report file in XML format
in the HM subdirectory of the ADR home for the current instance,
and then displayed. If the report file already exists, it is just
displayed. When using the ADRCI utility, you must first run a
command to generate the report file if it does not exist, and then
run another command to display its contents.
The preferred method to view checker reports is with Enterprise Manager. The following sections provide instructions for all methods:
See Also:
"Automatic Diagnostic Repository (ADR)"Viewing Reports Using Enterprise Manager
You can also view Health Monitor reports and findings for a given checker run using Enterprise Manager.
To view run findings using Enterprise Manager
-
Access the Database Home page.
For Oracle Enterprise Manager Database Control, see Oracle Database 2 Day DBA for instructions. For Oracle Enterprise Manager Grid Control, go to the desired database target.
-
In the Related Links section, click Advisor Central.
-
Click Checkers to view the Checkers subpage.
-
Click the run name for the checker run that you want to view.
The Run Detail page appears, showing the findings for that checker run.
-
Click Runs to display the Runs subpage.
Enterprise Manager displays more information about the checker run.
-
Click View Report to view the report for the checker run.
The report is displayed in a new browser window.
Viewing Reports Using DBMS_HM
You can view Health Monitor checker reports with the
DBMS_HM
package function GET_RUN_REPORT
.
This function enables you to request HTML, XML, or text formatting.
The default format is text, as shown in the following SQL*Plus
example:
SET LONG 100000 SET LONGCHUNKSIZE 1000 SET PAGESIZE 1000 SET LINESIZE 512 SELECT DBMS_HM.GET_RUN_REPORT('HM_RUN_1061') FROM DUAL; DBMS_HM.GET_RUN_REPORT('HM_RUN_1061') ----------------------------------------------------------------------- Run Name : HM_RUN_1061 Run Id : 1061 Check Name : Data Block Integrity Check Mode : REACTIVE Status : COMPLETED Start Time : 2007-05-12 22:11:02.032292 -07:00 End Time : 2007-05-12 22:11:20.835135 -07:00 Error Encountered : 0 Source Incident Id : 7418 Number of Incidents Created : 0 Input Paramters for the Run BLC_DF_NUM=1 BLC_BL_NUM=64349 Run Findings And Recommendations Finding Finding Name : Media Block Corruption Finding ID : 1065 Type : FAILURE Status : OPEN Priority : HIGH Message : Block 64349 in datafile 1: '/u01/app/oracle/dbs/t_db1.f' is media corrupt Message : Object BMRTEST1 owned by SYS might be unavailable Finding Finding Name : Media Block Corruption Finding ID : 1071 Type : FAILURE Status : OPEN Priority : HIGH Message : Block 64351 in datafile 1: '/u01/app/oracle/dbs/t_db1.f' is media corrupt Message : Object BMRTEST2 owned by SYS might be unavailable
Viewing Reports Using the ADRCI Utility
You can create and view Health Monitor checker reports using the ADRCI utility.
To create and view a checker report using ADRCI:
-
Ensure that operating system environment variables (such as
ORACLE_HOME
) are set properly, and then enter the following command at the operating system command prompt:ADRCI
The utility starts and displays the following prompt:
adrci>>
Optionally, you can change the current ADR home. Use the
SHOW HOMES
command to list all ADR homes, and theSET HOMEPATH
command to change the current ADR home. See Oracle Database Utilities for more information. -
Enter the following command:
show hm_run
This command lists all the checker runs (stored in
V$HM_RUN
) registered in the ADR repository. -
Locate the checker run for which you want to create a report and note the checker run name. The
REPORT_FILE
field contains a filename if a report already exists for this checker run. Otherwise, generate the report with the following command:create report hm_run run_name
-
To view the report, enter the following command:
show report hm_run run_name
See Also:
"Automatic Diagnostic Repository (ADR)"Health Monitor Views
Instead of requesting a checker report, you can view the results
of a specific checker run by directly querying the ADR data from
which reports are created. This data is available through the views
V$HM_RUN
, V$HM_FINDING
, and
V$HM_RECOMMENDATION
.
The following example queries the V$HM_RUN
view to
determine a history of checker runs:
SELECT run_id, name, check_name, run_mode, src_incident FROM v$hm_run; RUN_ID NAME CHECK_NAME RUN_MODE SRC_INCIDENT ---------- ------------ ---------------------------------- -------- ------------ 1 HM_RUN_1 DB Structure Integrity Check REACTIVE 0 101 HM_RUN_101 Transaction Integrity Check REACTIVE 6073 121 TXNCHK Transaction Integrity Check MANUAL 0 181 HMR_tab$ Dictionary Integrity Check MANUAL 0 . . . 981 Proct_ts$ Dictionary Integrity Check MANUAL 0 1041 HM_RUN_1041 DB Structure Integrity Check REACTIVE 0 1061 HM_RUN_1061 Data Block Integrity Check REACTIVE 7418
The next example queries the V$HM_FINDING
view to
obtain finding details for the reactive data block check with
RUN_ID
1061:
SELECT type, description FROM v$hm_finding WHERE run_id = 1061; TYPE DESCRIPTION ------------- ----------------------------------------- FAILURE Block 64349 in datafile 1: '/u01/app/orac le/dbs/t_db1.f' is media corrupt FAILURE Block 64351 in datafile 1: '/u01/app/orac le/dbs/t_db1.f' is media corrupt
See Also:
-
Oracle Database Reference for more information on the
V$HM_*
views
Health Check Parameters Reference
The following tables describe the parameters for those health
checks that require them. Parameters with a default value of
(none)
are mandatory.
Table 9-6 Parameters for Data Block Integrity Check
|
Number |
(none) |
Block datafile number |
|
Number |
(none) |
Data block number |
Table 9-7 Parameters for Redo Integrity Check
|
Text |
0 |
SCN of the latest good redo (if known) |
Table 9-8 Parameters for Undo Segment Integrity Check
|
Text |
(none) |
Undo segment number |
Table 9-9 Parameters for Transaction Integrity Check
|
Text |
(none) |
Transaction ID |
Table 9-10 Parameters for Dictionary Integrity Check
|
Text |
|
Possible values are:
|
|
Text |
|
Name of a single core table to check. If omitted, all core tables are checked. |
相关推荐
healthchecks 是一个定时任务的看守者。healthchecks是一个监听定时任务pings的web服务,并且提供了一个web界面。 基于以下技术构建: Python 2 or Python 3 Django 1.9 PostgreSQL or MySQL 标签...
Api-healthchecks.zip,用于微服务探索、文档和监视的运行状况检查api的go实现。go health checks,一个api可以被认为是多个软件设备之间通信的指导手册。例如,api可用于web应用程序之间的数据库通信。通过提取实现并...
Healthchecks .io API客户端 healthchecks-io-client库包含两个简单便捷的HTTP客户端,用于向和发出请求。 目录 管理API客户端选项 例子 Ping API客户端示例 Management API客户端示例 文献资料 Ping API客户端文档...
AspNet.Diagnostics.HealthChecks 该项目是基于项目的用于创建HealthChecks的ASP Net Full Framework版本。 AspNet.Diagnostics.HealthChecks AspNet.HealthChecks.UI.Client NuGet 待办事项清单 与.NET ...
AspNetCore.Diagnostics.HealthChecks 该存储库为广泛使用的服务和平台提供了广泛的ASP.NET Core Health Check软件包集合。 支持的ASP.NET Core版本:5.0、3.1、3.0和2.2 栏目 先前版本的文档 健康检查 Health...
在您的服务中使用运行状况healthchecks框架很容易。 为服务中的每个依赖项定义一个StatusEndpoint 。 注册healthchecks框架以响应所有/status/...请求,并传递所有StatusEndpoint的一部分。 而已! 只要您正确...
healthchecks, Django 应用程序,它监听 ping,并在ping过期时发送通知 healthchecks healthchecks是你的作业的看门狗。 它是一个网络服务器,它监听来自你的作业的ping,以及一个网络接口。它住在这里:...
Healthchecks healthchecks 是您的 cron 作业的看门狗。 它是一个 Web 服务器,用于侦听来自您的 cron 作业的 ping,以及一个 Web 界面。 它位于此处:http://healthchecks.io/ 构建块是:Python 3.6+ Django 3 ...
healthchecks.io的Terraform提供者-Go-Shell-下载
Api-health-checks-api.zip,标准化服务和应用程序在分布式应用程序运行状况检查api中公开其状态的方式,一个api可以被认为是多个软件设备之间通信的指导手册。例如,api可用于web应用程序之间的数据库通信。通过提取...
资源来自pypi官网。 资源全名:dj-healthchecks-0.0.1.tar.gz
django-healthchecks 简单的Django应用程序/框架可发布运行状况检查以进行监视 特征: 通过Python函数进行自定义检查 远程健康检查 心跳监测 地位 安装 pip install django_healthchecks 用法 将以下内容添加到您...
Laravel Healthchecks是一个简单的控制器类,可帮助您构建自己的healthchecks端点而不会出现问题。 :handshake: 配套 GitHub上的Renoki Co.致力于将许多开源项目和有用的项目推向世界。 每天开发和维护项目是一项...
健康检查 集成以与集成。 安装 从搜索并安装healthchecksio ...这是您的Healthchecks.io实例的根URL。 Ping端点 这是用于ping的端点的路径。 欢迎捐款! 如果您想为此做出贡献,请阅读贡献准则
关于基于Alpine Linux的 Docker映像。 如果您有兴趣,我的其他Docker映像! :light_bulb: 想要...特征以非root用户身份运行多平台图片作为反向代理以及“加密加密”证书的创建/更新(请参见此)在本地构建git clone ...
python库,解压后可用。 资源全名:django_healthchecks-1.0.0-py2.py3-none-any.whl
资源来自pypi官网。 资源全名:django_healthchecks-1.0.0-py2.py3-none-any.whl
指标健康检查严重性 Metrics Healthchecks Severity是一个很小的库,可在运行状况检查结果中添加“严重性”详细信息。
healthchecks.io Docker服务档案文件示例文件在其相应位置具有.example扩展名。 文件名目的笔记hc/app/config/local_settings.py 应用程序的设置cf. nginx/config/hc.conf nginx配置文件必须命名为hc.conf ,将挂载...