search
HomeDatabaseMysql Tutorial禁用与卸载Oracle AWR特性

AWR需要禁用?这么好的东东。缺省的情况下,AWR是可以使用的,需要耗用一定的sysaux表空间。但涉及到有关AWR相关的调试包(需要li

AWR需要禁用?这么好的东东。缺省的情况下,AWR是可以使用的,需要耗用一定的sysaux表空间。但涉及到有关AWR相关的调试包(需要license)会访问AWR视图或者awr异常又不想更新patch,甚至没有patch可用的情况下,我们可以禁用AWR以及卸载AWR,本文演示了如果禁用AWR功能以及卸载awr相关的数据字典。

1、禁用AWR的目的
    If most of the space in the SYSAUX tablespace is consumed by information associated with the Automatic Workload Repository (AWR), the AWR can be disabled or uninstalled, releasing space in the sysaux tablespace. This is specially relevant to customers who do not have a license to use AWR.

2、如何禁用AWR(Oracle 10g and above)

    AWR is enabled by default because many database features that are not part of the Diagnostic Pack such as Automatic Segment Advisor and Undo Advisor need information captured in AWR. Use of these features, which implicitly access some AWR views, does not require Diagnostic Pack license.

    What is not permitted without the Diagnostic Pack license is direct access by customers of AWR views and reports. Oracle, therefore, recommends that all customers, with or without Diagnostic Pack license, leave AWR enabled so that they can benefit from features that do not require a license but implicitly use AWR.  (When running both AWR and Statspack collection on one database, it is advised to schedule the two types of collections at different times.  For example, if the AWR takes a snapshot every hour, on the hour, then you could schedule a Statspack snapshot every hour, at the bottom of each hour.)

    However, for those users who all the same want to disable AWR, the package DBMS_AWR described below can be instaled and used. The package gives the ability to disable and enable AWR so as not to breaching Diagnostic Pack license terms.

Affected Releases:
All Oracle Database 10g releases and onwards

禁用awr需要下载: dbmsnoawr.plb 文件。

------------------------------------------分割线------------------------------------------

免费下载地址在

用户名与密码都是

具体下载目录在 /2014年资料/9月/12日/禁用与卸载Oracle AWR特性

下载方法见

------------------------------------------分割线------------------------------------------

注意这里的禁用我们指的是完全停用。当然通过设置STATISTICS_LEVEL也可以从一定程度上实现类似的目的。
如果将参数STATISTICS_LEVEL设置为BASIC,下列重要的统计信息将不会被收集。
  Automatic Workload Repository (AWR) Snapshots
  Automatic Database Diagnostic Monitor (ADDM)
  All server-generated alerts
  Automatic SGA Memory Management
  Automatic optimizer statistics collection
  Object level statistics
  End to End Application Tracing (V$CLIENT_STATS)
  Database time distribution statistics (V$SESS_TIME_MODEL and V$SYS_TIME_MODEL)
  Service level statistics
  Buffer cache advisory
  MTTR advisory
  Shared pool sizing advisory
  Segment level statistics
  PGA Target advisory
  Timed statistics
  Monitoring of statistics

3、演示禁用AWR

oracle@USDB:~> export ORACLE_SID=HKBO5
oracle@USDB:~> sqlplus / as sysdba
sys@HKBO5> select * from v$version where rownum

BANNER
----------------------------------------------------------------
Oracle Database 10g Release 10.2.0.3.0 - 64bit Production

--查看禁用前awr的使用频率
sys@HKBO5> SELECT name,
  2            detected_usages detected,
  3        total_samples  samples,
  4            currently_used  used,
  5            to_char(last_sample_date,'MMDDYYYY:HH24:MI') last_sample,
  6            sample_interval interval
  7        FROM dba_feature_usage_statistics
  8  WHERE name = 'Automatic Workload Repository';

NAME                                                              DETECTED    SAMPLES USED  LAST_SAMPLE      INTERVAL
---------------------------------------------------------------- ---------- ---------- ----- -------------- ----------
Automatic Workload Repository                                            0        207 FALSE 09112014:00:12    604800

oracle@USDB:~> ll *awr*
-rw-r--r-- 1 oracle oinstall 2369 2014-08-21 17:26 dbmsnoawr.plb

--Author : Leshami
--Blog  :

--执行dbmsnoawr.plb,,其实质是添加了一个名为dbms_awr的pkg到当前数据库
sys@HKBO5> @dbmsnoawr.plb

Package created.

Package body created.

sys@HKBO5> exec dbms_awr.disable_awr();

PL/SQL procedure successfully completed.

sys@HKBO5> desc dbms_awr
FUNCTION AWR_ENABLED RETURNS BOOLEAN
FUNCTION AWR_STATUS RETURNS VARCHAR2
PROCEDURE DISABLE_AWR
PROCEDURE ENABLE_AWR

--查看disable后awr的状态,返回值为disable
sys@HKBO5> select dbms_awr.awr_status from dual;

AWR_STATUS
-------------------------------------------------------------
DISABLED

--查询awr的数据字典,发现SNAP_INTERVAL变成了0值
sys@HKBO5> select * from dba_hist_wr_control;

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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools