Link to home
Start Free TrialLog in
Avatar of bkreynolds48
bkreynolds48

asked on

oracle awr & addm reports - automate

is there a way to automate the awr and addm reports - I want to run them every day for a period of one day - how do you find the right start/end numbers?  I need this to fit into a script I can put in cron.

oracle 11g aix 6

thanks
Avatar of Sean Stuber
Sean Stuber

To find the min/max ids for yesterday try this:

SELECT MIN(snap_id) minid, MAX(snap_id) maxid
  FROM dba_hist_snapshot
 WHERE begin_interval_time >= TRUNC(SYSDATE) - 1 AND end_interval_time < TRUNC(SYSDATE)
Avatar of bkreynolds48

ASKER

ok - but how do I script this to run the awr and addm report - how do you get those values into
@awr
and
@addm
ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
is there a way to make this html?
change

awr_report_text

to

awr_report_html
great ! :)
thanks much