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
Oracle DatabaseUnix OS

Avatar of undefined
Last Comment
bkreynolds48

8/22/2022 - Mon
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)
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
Sean Stuber

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
bkreynolds48

ASKER
is there a way to make this html?
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck
Sean Stuber

change

awr_report_text

to

awr_report_html
bkreynolds48

ASKER
great ! :)
thanks much