Search This Blog

Total Pageviews

Tuesday, 4 October 2011

Oracle active session report ( ASH report )

How much data is in your historical view, you can info from the
DBA_HIST_ACTIVE_SESS_HISTORY view:

Manually Getting Active Session Information



col Min_time format a25
col Max_time format a25
SELECT min(sample_time) Min_time ,max(sample_time) Max_time
FROM dba_hist_active_sess_history;

MIN_TIME MAX_TIME
------------------------- -------------------------
25-SEP-11 02.00.45.233 AM 04-OCT-11 11.40.04.639 AM


SQL> @$ORACLE_HOME/rdbms/admin/ashrpt.sql

Current Instance
~~~~~~~~~~~~~~~~

DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
1267852645 ORCL 1 orcl


Specify the Report Type
~~~~~~~~~~~~~~~~~~~~~~~
Enter 'html' for an HTML report, or 'text' for plain text
Defaults to 'html'
Enter value for report_type: text

Type Specified: text


Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 1267852645 1 ORCL orcl apt-amd-02

Defaults to current database

Using database id: 1267852645

Enter instance numbers. Enter 'ALL' for all instances in a
RAC cluster or explicitly specify list of instances (e.g., 1,2,3).
Defaults to current instance.

Using instance number(s): 1





ASH Samples in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Oldest ASH sample available: 25-Sep-11 15:00:33 [ 12835 mins in the past]
Latest ASH sample available: 04-Oct-11 12:55:30 [ 0 mins in the past]


Specify the timeframe to generate the ASH report
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter begin time for report:

-- Valid input formats:
-- To specify absolute begin time:
-- [MM/DD[/YY]] HH24:MI[:SS]
-- Examples: 02/23/03 14:30:15
-- 02/23 14:30:15
-- 14:30:15
-- 14:30
-- To specify relative begin time: (start with '-' sign)
-- -[HH24:]MI
-- Examples: -1:15 (SYSDATE - 1 Hr 15 Mins)
-- -25 (SYSDATE - 25 Mins)

Defaults to -15 mins
Enter value for begin_time: -50
Report begin time specified: -50

Enter duration in minutes starting from begin time:
Defaults to SYSDATE - begin_time
Press Enter to analyze till current time
Enter value for duration:
Report duration specified:

Using 04-Oct-11 12:06:22 as report begin time
Using 04-Oct-11 12:56:43 as report end time

1 comment:

Anuj Singh said...

http://anuj-singh.blogspot.co.uk/2017/08/oracle-active-session-report-ash-report.html

Oracle DBA

anuj blog Archive