About Oracle 10g/11g AWR

本文介绍了Oracle 10g中引入的AWR (Automatic Workload Repository) 功能及其使用方法。AWR作为Oracle官方推荐的性能分析工具,用于替代Statspack。文中详细解释了如何启用或禁用AWR,并提供了必要的SQL命令。此外,还提到了在繁忙系统中使用AWR可能遇到的问题及解决办法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Oracle 10g 开始 引入了AWR (Automatic Workload Repository). Oracle 建议用户用这个取代 Statspack。不过这个需要注意的是使用 AWR 需要有 Diagnostic Pack License。Oracle 后来推出了一个解决方案可以禁止掉该特性。

在 Note. 436386.1 有说明:

SQL> @dbms_awr.plb

然后执行:

dbms_awr.disable_awr();

如果用 sys 之外的用户创建 AWR 报告,则需要进行合适的授权。否则会报告错误 PACKAGE 执行错误。

CONNECT / AS SYSDBA;
GRANT ADVISOR TO foo;
GRANT SELECT_CATALOG_ROLE TO foo;
GRANT EXECUTE ON sys.dbms_workload_repository TO foo;

注意 Bug 4597354 在创建基线数据的时候,对性能有很大影响。在一个非常繁忙的系统上不要进行此操作。

如果结合企业管理器用 AWR 是很方便的,如果用手工方式收集性能数据,多了很多可供调整的地方,是更加方便了呢?还是更加麻烦了?

EOF

Google+
### OCDB SQL Usage and Tools For the Oracle Cluster Database (OCDB), several SQL commands and tools are essential for management, monitoring, and troubleshooting. The `AWR` report is one of the most important diagnostic tools that can be generated using specific SQL scripts to analyze performance issues within an Oracle environment including Exadata systems[^1]. To generate an AWR report which provides comprehensive information about system activities over a period: ```sql BEGIN DBMS_WORKLOAD_REPOSITORY.create_snapshot; END; / ``` This PL/SQL block forces an immediate snapshot creation useful when diagnosing real-time or recent past performance concerns. Another critical tool involves querying data dictionary views such as V$SESSION, V$PROCESS, GV$ACTIVE_INSTANCES among others. These dynamic performance views offer insights into current sessions, processes, active instances across multiple nodes in case of RAC setups like those found on Exadata platforms. A sample query might look like this: ```sql SELECT sid, serial#, status, username, machine, program FROM gv$session WHERE username IS NOT NULL AND status='ACTIVE'; ``` The above command retrieves details regarding all non-idle user sessions connected from any client machines running programs against the database instance(s). Additionally, there exist specialized packages provided by Oracle specifically designed for managing databases more effectively especially under complex environments like Exadata where hardware-software integration plays a crucial role; examples include DBMS_SERVICE package allowing administrators control over application services configured between different tiers while ensuring high availability requirements met without compromising security policies set forth at organizational levels. --related questions-- 1. How does generating snapshots help with performance tuning? 2. What kind of information do dynamic performance views provide? 3. Can you explain how service management works within Oracle RAC configurations? 4. In what scenarios would it be beneficial to use the DBMS_SERVICE package? 5. Are there other built-in utilities similar to AWR reports available for detailed analysis?
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值