SQL 性能健康检查脚本 (SQLHC) (Doc ID 1626277.1)
2014-07-16 06:20
549 查看
SQLHC一共有3个脚本:sqlhc.sql 和 sqldx.sql 和 sqlhcxec.sql
把这三个脚本放在同一个目录中:
然后就可以在sqlplus里边执行:SQL> START H:\test_a\sqlhc.sql T 51x6yr9ym5hdc
生成出来的文件是存放在 进入sqlplus 之前所在的os目录下。
下面是sqlhc.sql脚本的说明部分,摘录出来。
REM $Header: 1366133.1 sqlhc.sql 12.1.08 2014/04/18 carlos.sierra mauro.pagano $
REM
REM Copyright (c) 2000-2013, Oracle Corporation. All rights reserved.
REM
REM AUTHOR
REM carlos.sierra@oracle.com
REM mauro.pagano@oracle.com
REM
REM SCRIPT
REM sqlhc.sql SQL Health-Check (extract mode)
REM
REM DESCRIPTION
REM Produces an HTML report with a list of observations based on
REM health-checks performed in and around a SQL statement that
REM may be performing poorly.
REM
REM Inputs a memory-resident SQL_ID.
REM
REM In addition to the health_check report, it generates some
REM additional diagnostics files regarding SQL performance.
REM
REM This script does not install any objects in the database.
REM It does not perform any DDL commands.
REM It only performs DML commands against the PLAN_TABLE then it
REM rolls back those temporary inserts.
REM It can be used in Dataguard or any read-only database.
REM
REM PRE-REQUISITES
REM 1. Execute as SYS or user with DBA role or user with access
REM to data dictionary views.
REM 2. The SQL for which this script is executed must be
REM memory-resident.
REM
REM PARAMETERS
REM 1. Oracle Pack license (Tuning or Diagnostics or None) T|D|N
REM 2. SQL_ID of interest.
REM
REM EXECUTION
REM 1. Start SQL*Plus connecting as SYS or user with DBA role or
REM user with access to data dictionary views.
REM 2. Execute script sqlhc.sql passing values for parameters.
REM
REM EXAMPLE
REM # sqlplus / as sysdba
REM SQL> START [path]sqlhc.sql [T|D|N] [SQL_ID]
REM SQL> START sqlhc.sql T 51x6yr9ym5hdc
REM
REM NOTES
REM 1. For possible errors see sqlhc.log.
REM 2. If site has both Tuning and Diagnostics licenses then
REM specified T (Oracle Tuning pack includes Oracle Diagnostics)
REM 3. On a read-only instance, the "Observations" section with the
REM results of the health-checks will be missing.
把这三个脚本放在同一个目录中:
然后就可以在sqlplus里边执行:SQL> START H:\test_a\sqlhc.sql T 51x6yr9ym5hdc
生成出来的文件是存放在 进入sqlplus 之前所在的os目录下。
下面是sqlhc.sql脚本的说明部分,摘录出来。
REM $Header: 1366133.1 sqlhc.sql 12.1.08 2014/04/18 carlos.sierra mauro.pagano $
REM
REM Copyright (c) 2000-2013, Oracle Corporation. All rights reserved.
REM
REM AUTHOR
REM carlos.sierra@oracle.com
REM mauro.pagano@oracle.com
REM
REM SCRIPT
REM sqlhc.sql SQL Health-Check (extract mode)
REM
REM DESCRIPTION
REM Produces an HTML report with a list of observations based on
REM health-checks performed in and around a SQL statement that
REM may be performing poorly.
REM
REM Inputs a memory-resident SQL_ID.
REM
REM In addition to the health_check report, it generates some
REM additional diagnostics files regarding SQL performance.
REM
REM This script does not install any objects in the database.
REM It does not perform any DDL commands.
REM It only performs DML commands against the PLAN_TABLE then it
REM rolls back those temporary inserts.
REM It can be used in Dataguard or any read-only database.
REM
REM PRE-REQUISITES
REM 1. Execute as SYS or user with DBA role or user with access
REM to data dictionary views.
REM 2. The SQL for which this script is executed must be
REM memory-resident.
REM
REM PARAMETERS
REM 1. Oracle Pack license (Tuning or Diagnostics or None) T|D|N
REM 2. SQL_ID of interest.
REM
REM EXECUTION
REM 1. Start SQL*Plus connecting as SYS or user with DBA role or
REM user with access to data dictionary views.
REM 2. Execute script sqlhc.sql passing values for parameters.
REM
REM EXAMPLE
REM # sqlplus / as sysdba
REM SQL> START [path]sqlhc.sql [T|D|N] [SQL_ID]
REM SQL> START sqlhc.sql T 51x6yr9ym5hdc
REM
REM NOTES
REM 1. For possible errors see sqlhc.log.
REM 2. If site has both Tuning and Diagnostics licenses then
REM specified T (Oracle Tuning pack includes Oracle Diagnostics)
REM 3. On a read-only instance, the "Observations" section with the
REM results of the health-checks will be missing.
相关文章推荐
- SQL 性能健康检查脚本 (SQLHC) (文档 ID 1626277.1)
- Oracle SQL 性能健康检查脚本 (SQLHC) (文档 ID 1626277.1)
- oracle 数据库性能健康检查脚本[转帖]
- Oracle SQL 调优健康检查脚本
- 用Semisynchronous Replication半同步,mk-table-checksum数据同步一致性检查,监控主从同步运行状态的脚本等方式加强SQL性能和数据审核
- Script:SQL调优健康检查脚本
- Script:SQL调优健康检查脚本
- Script:SQL调优健康检查脚本
- Examples of how to use Error Logging for SQL statements (Doc ID 1076042.1)
- 教你50招提升ASP.NET性能(八):检查你使用了什么客户端脚本
- SQL 日常检查脚本
- Oracle SQL 调优健康检查脚本
- Oracle性能问题sql调优脚本集
- 利用NetScaler和自行编写的健康检查脚本,完美解决多台MySQL Slave数据库的负载均衡
- 如何对Oracle进行健康检查-性能调优
- 检查锁表的sql脚本
- 几个检查数据库性能的SQL语句
- Loadrunner测试数据库性能,测试SQL语句性能的脚本例子
- 服务器健康检查脚本
- Loadrunner测试数据库性能,测试SQL语句性能的脚本例子