oracle 10g 禁用和解除安裝AWR
適用於:
Oracle database 企業版 10.2.0.1 和之前的版本
目的:
如果sysuax表空間由於awr報告消耗過多的空間,awr報告可以禁用或者解除安裝,釋放sysaux表空間的空間。
解決方案:
awr預設是啟用的,因為資料庫的許多新特性,如Automatic segment advisor and Undo advisor捕獲的資訊都保持在awr中,這些新特性,可以透過訪問awr一些試圖獲得。
在Metalink Note:1909073.1中,Oracle提供了一個增強指令碼,稱為: dbmsnoawr.plb
透過這個指令碼可以啟用和禁用AWR取樣功能.
Rem
Rem dbmsnoawr.sql
Rem
Rem Copyright (c) 2006, Oracle. All rights reserved.
Rem
Rem NAME
Rem dbmsnoawr.sql - Declaration of the DBMS_AWR package
Rem
Rem DESCRIPTION
Rem Utilities for disabling and getting status of AWR
Rem
Rem NOTES
Rem
Rem MODIFIED (MM/DD/YY)
Rem gwood 04/13/07 - created
Rem
create or replace package dbms_awr as
-- PACKAGE dbms_awr
-- This package allows users to disable AWR functionality in a Oracle 10g+ database.
-- The use of this package is not resticted by licencing of the Diagnostic Pack.
-- Additionally this package contains two functions that can be used to determine
-- if AWR is currently enabled.
--
-- PROCEDURE dbms_awr.disable_awr
-- PURPOSE: turns off collections into Automatic Workload Repository
-- PARAMETERS: none
procedure disable_awr;
-- PROCEDURE dbms_awr.enable_awr
-- PURPOSE: turns on collections into Automatic Workload Repository. The capture interval
-- is set to the default of 60 minutes.
-- PARAMETERS: none
procedure enable_awr;
-- FUNCTION dbms_awr.awr_enabled
-- PURPOSE: Returns TRUE if Automatic Workload Repository is performing periodic capture.
-- Returns FALSE if Automatic Workload Repository periodic capture is disabled.
-- PARAMETERS: none
function awr_enabled return boolean;
-- FUNCTION dbms_awr.awr_status
-- PURPOSE: Returns 'ENABLED' if Automatic Workload Repository is performing periodic capture.
-- Returns 'DISABLED' if Automatic Workload Repository periodic capture is disabled.
-- PARAMETERS: none
function awr_status return varchar2;
end dbms_awr;
/
create or replace package body dbms_awr wrapped
a000000
b2
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
abcd
b
27b 1de
XeDco+SpVfG9KEZ2ikXc00yhW88wg2P3AK7bfHRAWE7VX0b1S25KKJCp5VrehjNR9oaXoWT1
GGfYVnyl/lLyux308Fmhfp1y9pjrQyux50RY8xmHmiSG2bFbFs2Upn6MLYcfsqsW+joOTKYe
4TyFpXVqzVWS+Tjt8bcmSiai64IVcdOB3Q7Y6kQ8PGwqXqAiy9sFQKD0X6RC/ePGAQzUKwvS
3L8/hKgjdK9Fgw8bb7v1HTq22OJlAv+R/DYCSK57rPmAkyx/XLuXcPo3hcYs8fvUUAO33szW
gy5zNau9U7xiyAOExBz9Vh0U7EaMRl6rLr6UXpk/0tk3BW0W/GVo3XfdSzUpGN5aKa1xF2Yh
trcMV3KuK/FfIpy0bNDxSQ3LFuOsB8i5xzhj/dCqMxT4dO2awc0hnP3XeLhxWDvcEuqdkR9O
u+Z6US/LtRISXt2I8zFq6/aDSuOXTor9KQ1jYA==
/
Installing the Package:
SQL> @dbmsnoawr.plb
To execute the package, use the command:
SQL> begin dbms_awr.disable_awr(); end;
Note:
Some database features may become unavailable because of their dependence on the AWR.
For example, the Automatic Segment Advisor will be turned off.
However, they can still be invoked manually.
Before the feature is disabled, the view dba_feature_usage_statistics can be used to check how often AWR was utilized:
SQL v10204> SELECT name,
2 detected_usages detected,
total_samples samples,
3 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
WHERE name = 'Automatic Workload Repository';
8
NAME DETECTED SAMPLES USED LAST_SAMPLE INTERVAL
-------------------- ---------- ---------- ----- -------------- ----------
Automatic Workload 15 169 FALSE 05012012:23:22 604800
Repository
The output shows AWR was detected 15 times with 169 samples.
解除安裝 AWR
It is not recommended to uninstall AWR.
However, for those users who wish to uninstall AWR, they can use the following method:
connect / as sysdba
show parameters statistics_level
alter system set statistics_level=basic scope=spfile;
shutdown immediate
startup restrict
$ORACLE_HOME/rdbms/admin/catnoawr
shutdown immediate
startup
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12798004/viewspace-1762228/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle 10g AWR安裝使用Oracle 10g
- oracle 10g rac 解除安裝Oracle 10g
- windows xp解除安裝oracle 10gWindowsOracle 10g
- oracle 10G 徹底解除安裝crsOracle 10g
- [轉]win7安裝和解除安裝oracle 10GWin7Oracle
- 10g RAC 解除安裝
- 【聽海日誌】之ORACLE 10G AWR安裝使用Oracle 10g
- Oracle 10g RAC for linux 的完全解除安裝Oracle 10gLinux
- Oracle RAC 10g for Solaris環境解除安裝(二)Oracle
- Oracle RAC 10g for Solaris環境解除安裝(一)Oracle
- oracle解除安裝Oracle
- ORACLE 解除安裝Oracle
- Oracle 安裝與解除安裝Oracle
- Oracle 10g,PLSQL客戶端安裝與配置,解除安裝說明Oracle 10gSQL客戶端
- LINUX下解除安裝ORACLE 10g資料庫LinuxOracle 10g資料庫
- 解除安裝ORACLE CRSOracle
- ORACLE TEXT安裝與解除安裝Oracle
- Ubuntu解除安裝和安裝Ubuntu
- ORACLE 10G AWR 速查!Oracle 10g
- oracle 19c 安裝、解除安裝Oracle
- window和Linux下完全解除安裝OracleLinuxOracle
- Windows下解除安裝OracleWindowsOracle
- 解除安裝Oracle GoldenGateOracleGo
- oracle 解除安裝問題Oracle
- linux 解除安裝jdk和安裝LinuxJDK
- oracle 10G特性之awrOracle 10g
- Oracle 10g,AWR,AWR,ADDM最佳實踐Oracle 10g
- Oracle 11g解除安裝grid和databaseOracleDatabase
- (轉)LINUX和windows下完全解除安裝ORACLELinuxWindowsOracle
- Oracle11g解除安裝Oracle
- linux下解除安裝oracleLinuxOracle
- Oracle 11g解除安裝Oracle
- ORACLE11G 解除安裝Oracle
- 解除安裝oracle10gOracle
- 解除安裝oracle資料庫Oracle資料庫
- Oracle grid infrastructure 解除安裝OracleASTStruct
- Ubuntu解除安裝及安裝node和npmUbuntuNPM
- ORACLE10G AWR安裝配置---05Oracle