No question at this time
DBA Top 10
1 A. Kavsek 8600
2 M. Cadot 7200
3 B. Vroman 5900
4 T. Boles 4550
5 J. Schnackenberg 3900
6 P. Wisse 3400
7 G. Lambregts 1100
7 . Lauri 1100
7 T. P 1100
10 R. Pattyn 800
About
DBA-Village
The DBA-Village forum
Forum as RSS
as RSS feed
Site Statistics
Ever registered users48374
Total active users1539
Act. users last 24h4
Act. users last hour0
Registered user hits last week171
Registered user hits last month999
Go up

How to script ash report run for every 5 minute interval?
Next thread: Upgrade 11g 4 Node RAC Database to 12 with Dataguard in-place
Prev thread: Add new port on Cluster Listener

Message Score Author Date
Hi, Does anyone know how to script out ASH Repo...... BenBart BartBen Aug 15, 2018, 04:18
Something like this? <pre> WITH params AS (SEL...... Score: 600 PtsScore: 600 PtsScore: 600 PtsScore: 600 PtsScore: 600 Pts Jan Schnackenberg Aug 15, 2018, 08:54

Follow up by mail Click here


Subject: How to script ash report run for every 5 minute interval?
Author: BenBart BartBen, Philippines
Date: Aug 15, 2018, 04:18, 282 days ago
Os info: Linux
Oracle info: 12c
Message: Hi,

Does anyone know how to script out ASH Report at 5 minute interval instead of having to re-run @$ORACLE_HOME/rdbms/admin/ashrpti.sql manually for each interval?

For example, I want to run ASH Report from 05-AUG-2018 14:00 to 05-AUG-2018 15:00 at 5 minute duration and all others at default.

Saw a note about running AWR/ASH in Silence Mode -
How to Generate AWR/ASH/ADDM in Silence Mode(Doc ID 2409450.1 that says use

select output

from table(dbms_workload_repository.ash_report_text((select dbid from v$database),
1,
TO_DATE('20130712203500',
'YYYYMMDDHH24MISS'),
TO_DATE('20130712204600',
'YYYYMMDDHH24MISS')));


Kinda hoping maybe someone knows of a ASH Generator that is similar to the AWR Generator that is https://flashdba.com/database/useful-scripts/awr-generator/

Thanks in advance.



Goto: Reply - Top of page 
If you think this item violates copyrights, please click here

Subject: Re: How to script ash report run for every 5 minute interval?
Author: Jan Schnackenberg, Germany
Date: Aug 15, 2018, 08:54, 281 days ago
Score:   Score: 600 PtsScore: 600 PtsScore: 600 PtsScore: 600 PtsScore: 600 Pts
Message: Something like this?


WITH params AS (SELECT TO_DATE('2018-08-01 00:00:00', 'YYYY-MM-DD HH24:MI:SS') start_date,
TO_DATE('2018-08-02 00:00:00', 'YYYY-MM-DD HH24:MI:SS') end_date,
TO_DSINTERVAL('0 00:05:00') line_interval
FROM dual)
SELECT 'SELECT output FROM TABLE(dbms_workload_repository.ash_report_text((SELECT dbid FROM v$database), 1, TO_DATE('''
||TO_CHAR(start_date + (line_interval * (level-1)), 'YYYY-MM-DD HH24:MI:SS')||''', ''YYYY-MM-DD HH24:MI:SS''), TO_DATE('''
||TO_CHAR(start_date + (line_interval * (level)), 'YYYY-MM-DD HH24:MI:SS')||''', ''YYYY-MM-DD HH24:MI:SS'')));' cmd
FROM params
CONNECT BY start_date + (line_interval * (level)) <= end_date;


Modify the dates in the "params" subquery to fit your needs.

Regards,
Jan
Your rating?: This reply is Good Excellent
Goto: Reply - Top of page 
If you think this item violates copyrights, please click here