search

AWR报告是我们研究分析Oracle性能,特别是应用程序工作特性的重要工具手段。进入10g之后,随着CBO的推广、自动作业机制的确立,越

AWR报告是我们研究分析Oracle性能,特别是应用程序工作特性的重要工具手段。进入10g之后,随着CBO的推广、自动作业机制的确立,越来越多的运维人员乃至开发人员将AWR作为分析性能的工具。

除了AWR报告本身,Oracle还提供了一些AWR相关的脚本,用于进行辅助操作。本篇主要介绍awr Info脚本。

1、环境介绍

本篇使用Oracle 11gR2进行实验,具体版本为11.2.0.4。

[oracle@SICS-MIGPC-DB ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on Sat Oct 10 08:52:31 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

SQL> conn / as sysdba

Connected.

SQL> select * from v$version;

BANNER

--------------------------------------------------------------------------------

Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

PL/SQL Release 11.2.0.4.0 - Production

CORE    11.2.0.4.0      Production

TNS for Linux: Version 11.2.0.4.0 - Production

NLSRTL Version 11.2.0.4.0 – Production

2、脚本执行

执行的生成脚本是在Oracle客户端。为避免由于版本原因带来的差异问题,笔者建议最好是在Oracle服务器端生成文件。

[oracle@SICS-MIGPC-DB ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on Sat Oct 10 09:16:45 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

SQL> conn / as sysdba

Connected.

SQL> @?/rdbms/admin/awrinfo.sql

之后要求输入报告名称。

This script will report general AWR information

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Specify the Report File Name

~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The default report file name is awrinfo.txt.  To use this name,

press to continue, otherwise enter an alternative.

Enter value for report_name:

最后会自动输出信息:

(若干输出)

(2b) ASH details (past 1 day)

**********************************

INST MIN_TIME        MAX_TIME          NUM_SAMPLES    NUM_ROWS AVG_ACTIVE

---- ---------------- ---------------- ------------ ------------ ----------

1 10:10:12 (10/09) 08:49:19 (10/10)        8,145        1,604      0.20

**********************************

(2c) ASH sessions (Fg Vs Bg) (past 1 day across all instances in RAC)

**********************************

Foreground %          90.0

Background %          10.0

MMNL %                  0.0

End of Report

Report written to awrinfo.txt

在当前目录下,会看到awrinfo.txt文件。下面会分部分进行解析:

3、结果解析

下面分为若干部分进行结果说明。

第一部分:报告信息说明。抽取出AWR配置信息和保留自动删除信息。

~~~~~~~~~~~~~~~

AWR INFO Report

~~~~~~~~~~~~~~~

Report generated at                         

09:18:28 on Oct 10, 2015 ( Saturday ) in Timezone +08:00                   

Warning: Non Default AWR Setting!                                                                             

--------------------------------------------------------------------------------                             

Snapshot interval is 60 minutes and Retention is 8 days                                                       

DB_ID DB_NAME  HOST_PLATFORM                            INST STARTUP_TIME      LAST_ASH_SID PAR     

------------ --------- ---------------------------------------- ----- ----------------- ------------ ---     

* 2746051042 SICSDB    SICS-MIGPC-DB - Linux x86 64-bit            1 10:28:41 (01/08)      23726128 NO   

第二部分:AWR镜像snapshot信息。依据规则,每次snapshot记录是保存在sysaux表空间里面的。经常会遇到SYSAUX不断增大超过限制的问题,一般都是由于AWR Purge引起的问题。

########################################################

(I) AWR Snapshots Information

########################################################

*****************************************************

(1a) SYSAUX usage - Schema breakdown (dba_segments)

*****************************************************

|                                                                                                             

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Explain the InnoDB Buffer Pool and its importance for performance.Explain the InnoDB Buffer Pool and its importance for performance.Apr 19, 2025 am 12:24 AM

InnoDBBufferPool reduces disk I/O by caching data and indexing pages, improving database performance. Its working principle includes: 1. Data reading: Read data from BufferPool; 2. Data writing: After modifying the data, write to BufferPool and refresh it to disk regularly; 3. Cache management: Use the LRU algorithm to manage cache pages; 4. Reading mechanism: Load adjacent data pages in advance. By sizing the BufferPool and using multiple instances, database performance can be optimized.

MySQL vs. Other Programming Languages: A ComparisonMySQL vs. Other Programming Languages: A ComparisonApr 19, 2025 am 12:22 AM

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages ​​such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages ​​have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

Learning MySQL: A Step-by-Step Guide for New UsersLearning MySQL: A Step-by-Step Guide for New UsersApr 19, 2025 am 12:19 AM

MySQL is worth learning because it is a powerful open source database management system suitable for data storage, management and analysis. 1) MySQL is a relational database that uses SQL to operate data and is suitable for structured data management. 2) The SQL language is the key to interacting with MySQL and supports CRUD operations. 3) The working principle of MySQL includes client/server architecture, storage engine and query optimizer. 4) Basic usage includes creating databases and tables, and advanced usage involves joining tables using JOIN. 5) Common errors include syntax errors and permission issues, and debugging skills include checking syntax and using EXPLAIN commands. 6) Performance optimization involves the use of indexes, optimization of SQL statements and regular maintenance of databases.

MySQL: Essential Skills for Beginners to MasterMySQL: Essential Skills for Beginners to MasterApr 18, 2025 am 12:24 AM

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL: Structured Data and Relational DatabasesMySQL: Structured Data and Relational DatabasesApr 18, 2025 am 12:22 AM

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL: Key Features and Capabilities ExplainedMySQL: Key Features and Capabilities ExplainedApr 18, 2025 am 12:17 AM

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

The Purpose of SQL: Interacting with MySQL DatabasesThe Purpose of SQL: Interacting with MySQL DatabasesApr 18, 2025 am 12:12 AM

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

MySQL for Beginners: Getting Started with Database ManagementMySQL for Beginners: Getting Started with Database ManagementApr 18, 2025 am 12:10 AM

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function