Useful shortcuts for vi editor

Showing posts with label AWR. Show all posts
Showing posts with label AWR. Show all posts

Sunday 4 June 2017

statistics_level parameter

Purpose
The purpose of this parameter is to gather database and operating system statistics into SYSAUX tablespace. For example, it uses for defining the detail of AWR reports.

Usage
Current setting:
SQL> show parameter statistics_level;
-- default is "TYPICAL"

(options -> BASIC | TYPICAL | ALL)
Change setting permanently:
add this into init.ora file;
*.statistics_level='ALL'
-- BASIC is not enough to get AWR Report
-- TYPICAL is recommended for AWR Report
-- ALL gathers operating system and plan execution statistics records in extra for AWR Report

Then restart the instance to perform.

Change setting for current instance - temporary:

SQL> alter system set statistics_level = ALL;

Result
SQL> show parameter statistics_level;
-- output; ALL

To check detail information, we may look at v$statistics_level view.
SQL> select * from v$statistics_level;

Ref: https://docs.oracle.com/cd/B28359_01/server.111/b28320/initparams240.htm#REFRN10214

Wednesday 4 January 2017

How to enable 'Diagnostic' and 'Tuning' diagnostic packs?

Check parameter
SQL> SHOW PARAMETER control_management_pack_access

Solid solution
add this into initora file;
*.control_management_pack_access='DIAGNOSTIC+TUNING'  

Revoke the operation temporary
SQL> ALTER SYSTEM SET control_management_pack_access=NONE;

Thursday 10 November 2016

How to get AWR report as html file?

Generate Snapshots
SQL> EXEC DBMS_WORKLOAD_REPOSITORY.create_snapshot;
-> Run this SQL as twice (at the begin and at the end)

Get Automatic Workload Repository (AWR) as HTML format
Login -> Targets -> Databases -> Click Database -> Performance -> AWR -> AWR Report -> Select By Snapshot -> Click Generate Report -> Click Save to File -> Done :)