使用spawrrac.sql收集RAC数据库对比信息
2012-08-01 09:03
405 查看
在Oracle Database 11g中,Oracle引入了一个新的脚本工具spawrrac.sql用于收集RAC环境下的数据库对比信息,在某些情况下可以清晰的展现RAC环境中的一些问题,值得了解一试。
这个脚本同样可以用于Oracle Database 10g,我在10.2.0.4中使用一切正常,其他版本请测试后使用。
该脚本的文件说明信息如下:
Rem $Header: spawrrac.sql 23-apr-2007.11:13:39 cgervasi Exp $
Rem
Rem spawrrac.sql
Rem
Rem Copyright (c) 2007, Oracle. All rights reserved.
Rem
Rem NAME
Rem spawrrac.sql - Server Performance AWR RAC report
Rem
Rem DESCRIPTION
Rem This scripts generates a global AWR report to report
Rem performance statistics on all nodes of a cluster.
Rem
Rem NOTES
Rem Usually run as SYSDBA
运行和使用awrrpt.sql脚本类似:
SQL> @?/rdbms/admin/spawrrac.sql
Instances in this AWR schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Instance
DB Id DB Name Count
----------- ------------ --------
4266683088 SMSDB 2
Enter value for dbid: 4266683088
Using 4266683088 for database Id
Specify the number of days of snapshots to choose from
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Entering the number of days (n) will result in the most recent
(n) days of snapshots being listed. Pressing <return> without
specifying a number lists all completed snapshots.
Listing the last 31 days of Completed Snapshots
Snap Instance
DB Name Snap Id End Interval Time Level Count
------------ --------- ----------------- ----- --------
SMSDB 9398 26 Jan 2009 00:00 1 2
......
SMSDB 9566 02 Feb 2009 00:00 1 2
9567 02 Feb 2009 01:00 1 2
9568 02 Feb 2009 02:00 1 2
9569 02 Feb 2009 03:00 1 2
9570 02 Feb 2009 04:00 1 2
9571 02 Feb 2009 05:00 1 2
9572 02 Feb 2009 06:00 1 2
9573 02 Feb 2009 07:00 1 2
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 9572
Begin Snapshot Id specified: 9572
Enter value for end_snap: 9573
End Snapshot Id specified: 9573
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is spawrrac_9572_9573. To use this name,
press <return> to continue, otherwise enter an alternative.
Enter value for report_name:
Using the report name spawrrac_9572_9573
生成的报告摘要。
比如第一部分我们就能看到,实例2的繁忙程度要远远大于实例1:
OS Stat
~~~~~~~
Num Load Load
Inst # CPUs Begin End % Busy % Usr % Sys % Idl Busy Time (s) Idle Time (s) Total time (s)
------ ---- ------ ------ ------ ------ ------ ------ ------------- ------------- --------------
1 4 .3 .5 2.6 1.1 1.5 97.4 378.61 13,974.33 14,352.94
2 4 1.2 1.2 26.9 10.2 16.7 73.1 3,861.20 10,492.55 14,353.75
------------- ------------- --------------
sum 4,239.81 24,466.88 28,706.69
而根据RAC的GC Current Blocks Received和GC Current Blocks Served,也可以看出两个节点之间的不均衡,这个RAC环境需要检查:
SysStat and GE Misc - RAC
~~~~~~~~~~~~~~~~~~~~~~~~~
GC Current GC CR GC Current GC CR
Blocks Blocks Blocks Blocks GC Messages GE Messages Msgs Rcvd
I# Received Received Served Served Sent Sent Actual
---- ----------- ----------- ----------- ----------- ----------- ----------- -----------
1 3,322 1,736 2,089,116 608 27,744 4,621 309,873
2 2,091,838 612 3,603 1,764 2,767,283 4,629 28,000
----------- ----------- ----------- ----------- ----------- ----------- -----------
sum 2,095,160 2,348 2,092,719 2,372 2,795,027 9,250 337,873
SysStat and GE Misc (per Sec) - RAC
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GC Current GC CR GC Current GC CR
Blocks Blocks Blocks Blocks GC Messages GE Messages Msgs Rcvd
I# Received/s Received/s Served/s Served/s Sent/s Sent/s Actual/s
---- ----------- ----------- ----------- ----------- ----------- ----------- -----------
1 .93 .48 581.91 .17 7.73 1.29 86.31
2 582.62 .17 1.00 .49 770.74 1.29 7.80
----------- ----------- ----------- ----------- ----------- ----------- -----------
sum 583.54 .65 582.92 .66 778.47 2.58 94.11
-The End-
这个脚本同样可以用于Oracle Database 10g,我在10.2.0.4中使用一切正常,其他版本请测试后使用。
该脚本的文件说明信息如下:
Rem $Header: spawrrac.sql 23-apr-2007.11:13:39 cgervasi Exp $
Rem
Rem spawrrac.sql
Rem
Rem Copyright (c) 2007, Oracle. All rights reserved.
Rem
Rem NAME
Rem spawrrac.sql - Server Performance AWR RAC report
Rem
Rem DESCRIPTION
Rem This scripts generates a global AWR report to report
Rem performance statistics on all nodes of a cluster.
Rem
Rem NOTES
Rem Usually run as SYSDBA
运行和使用awrrpt.sql脚本类似:
SQL> @?/rdbms/admin/spawrrac.sql
Instances in this AWR schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Instance
DB Id DB Name Count
----------- ------------ --------
4266683088 SMSDB 2
Enter value for dbid: 4266683088
Using 4266683088 for database Id
Specify the number of days of snapshots to choose from
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Entering the number of days (n) will result in the most recent
(n) days of snapshots being listed. Pressing <return> without
specifying a number lists all completed snapshots.
Listing the last 31 days of Completed Snapshots
Snap Instance
DB Name Snap Id End Interval Time Level Count
------------ --------- ----------------- ----- --------
SMSDB 9398 26 Jan 2009 00:00 1 2
......
SMSDB 9566 02 Feb 2009 00:00 1 2
9567 02 Feb 2009 01:00 1 2
9568 02 Feb 2009 02:00 1 2
9569 02 Feb 2009 03:00 1 2
9570 02 Feb 2009 04:00 1 2
9571 02 Feb 2009 05:00 1 2
9572 02 Feb 2009 06:00 1 2
9573 02 Feb 2009 07:00 1 2
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 9572
Begin Snapshot Id specified: 9572
Enter value for end_snap: 9573
End Snapshot Id specified: 9573
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is spawrrac_9572_9573. To use this name,
press <return> to continue, otherwise enter an alternative.
Enter value for report_name:
Using the report name spawrrac_9572_9573
生成的报告摘要。
比如第一部分我们就能看到,实例2的繁忙程度要远远大于实例1:
OS Stat
~~~~~~~
Num Load Load
Inst # CPUs Begin End % Busy % Usr % Sys % Idl Busy Time (s) Idle Time (s) Total time (s)
------ ---- ------ ------ ------ ------ ------ ------ ------------- ------------- --------------
1 4 .3 .5 2.6 1.1 1.5 97.4 378.61 13,974.33 14,352.94
2 4 1.2 1.2 26.9 10.2 16.7 73.1 3,861.20 10,492.55 14,353.75
------------- ------------- --------------
sum 4,239.81 24,466.88 28,706.69
而根据RAC的GC Current Blocks Received和GC Current Blocks Served,也可以看出两个节点之间的不均衡,这个RAC环境需要检查:
SysStat and GE Misc - RAC
~~~~~~~~~~~~~~~~~~~~~~~~~
GC Current GC CR GC Current GC CR
Blocks Blocks Blocks Blocks GC Messages GE Messages Msgs Rcvd
I# Received Received Served Served Sent Sent Actual
---- ----------- ----------- ----------- ----------- ----------- ----------- -----------
1 3,322 1,736 2,089,116 608 27,744 4,621 309,873
2 2,091,838 612 3,603 1,764 2,767,283 4,629 28,000
----------- ----------- ----------- ----------- ----------- ----------- -----------
sum 2,095,160 2,348 2,092,719 2,372 2,795,027 9,250 337,873
SysStat and GE Misc (per Sec) - RAC
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GC Current GC CR GC Current GC CR
Blocks Blocks Blocks Blocks GC Messages GE Messages Msgs Rcvd
I# Received/s Received/s Served/s Served/s Sent/s Sent/s Actual/s
---- ----------- ----------- ----------- ----------- ----------- ----------- -----------
1 .93 .48 581.91 .17 7.73 1.29 86.31
2 582.62 .17 1.00 .49 770.74 1.29 7.80
----------- ----------- ----------- ----------- ----------- ----------- -----------
sum 583.54 .65 582.92 .66 778.47 2.58 94.11
-The End-
相关文章推荐
- Scripts:查询数据库中参数文件的信息(在重新建库或者克隆数据库时经常使用)dba_cr_init.sql
- DBCC大全集之(适用版本MS SQLServer 2008 R2)----DBCC SQLPERF提供所有数据库的事务日志空间使用情况统计信息
- 使用SSIS WMI Data Reader 通过WMI收集数据库维护信息
- Oracle 9.2.0.8 RAC使用pl/sql连接数据库,查看数据库时间比现实时间晚8小时
- Scripts:比较数据库对象的信息(在开发环境中可能需要经常遇到,需要小心使用哦)dba_compare_schemas.sql
- 使用SQL从AWR收集数据库性能变化趋势
- 使用DBMS_HPROF包收集PL/SQL性能信息
- 使用SSIS WMI Data Reader 通过WMI收集数据库维护信息
- 使用SQL语句查询数据库信息及表结构
- RAC 数据库安装完成后,使用sql连接 提示连接到一个空实例
- 修改用户信息的时候,使用Servlet对新的数据和数据库的数据进行对比,修改成功实现页面的弹窗和页面的跳转
- 使用sql语句实现跨数据库获取信息
- 转 :Oracle 数据库信息收集工具RDA使用指南 Oracle 数据库信息收集工具RDA使用指南
- 从一个SQL使用了不理想的执行计划说开,浅谈执行计划如何估算cache信息的影响及系统统计信息的收集等(2010-10-15)
- 数据库知识-SQL查询语句精华使用简要
- MySQL学习----使用 MySQL 数据库和表----05获得数据库和表的信息及数据库物理物理文件简介
- Syslog-ng+Rsyslog收集日志:写入数据库MySQ, MS-SQL,SQLite, mSQL(六)
- 使用 SQL 语句从数据库一个表中随机获取一些数据
- 使用PL/SQL软件连接oracle11g数据库
- 使用sql server management studio 2008 连接数据库,无法查看数据库,提示 无法为该请求检索数据 错误916