Note – features in this post require the Diagnostics Pack license
[I originally had the first section at the end of the blog post, but then realised I might as well get the bad news out of the way to save you wasting your time if you’re not interested]
A small section of the course covers moving AWR data between instances to run the AWR comparison report against different environments.
The Bad News
As I mentioned before, one of Oracle’s local Pre-Sales Technical guys was on the course and he approached me at a break and said that he thought that these scripts were only to be used by Oracle Support. When I got home I re-ran the awrextr.sql script and, sure enough :-
sys@GP06PROD> @?/rdbms/admin/awrextr ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disclaimer: This SQL/Plus script should only be called under the guidance of Oracle Support. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
So an interesting demo, but only for home experimentation or if Oracle Support are involved and I certainly wouldn’t expect to see the script converted to use old exp/imp utilities rather than the Data Pump equivalent, as I was asked during the course. In retrospect, I imagine Oracle might request you run awrextr.sql and send the output dump file to them so they can use awrload.sql to load it for further analysis.
How to move AWR data to another repository
Connect to Source Instance as SYS
@?/rdbms/admin/awrextr
The script will prompt for
- dbid
- Number of days worth of snapshots to display for selection (just like awrrpt.sql)
- Begin Snap
- End Snap
- Directory Object Name for Data Pump (e.g. DATA_PUMP_DIR)
- Dump File Name
Connect to Target Instance as SYS
@?/rdbms/admin/awrload
The script will prompt for
- Directory Object Name for Data Pump (e.g. DATA_PUMP_DIR)
- Dump File Name
- Schema Name for staging schema that data will be imported into (the default of AWR_STAGE is fine)
- Default and Temporary tablespaces for the staging schema
@?/rdbms/admin/awrddrpi (Note the ‘i’ which allows you to specify which database/instances to report against)
The script will prompt for
- HTML or Text report format
- First dbid and instance number
- Number of days snapshots to display for selection from first repository
- Begin and end snapshot for first repository
- Second dbid and instance number
- Number of days snapshots to display for selection from second repository
- Begin and end snapshot for second repository
- Report file name
Doug,
as it was me, who came with the bad news in Prague, I owe you a good news. And the good news is that you were right during our dialogue that you have seen the AWR Transport documented somewhere. I also made my homework and found out that the difference is in the version – it is not documented for 10g, but it is for 11g http://download.oracle.com/docs/cd/B28359_01/server.111/b28274/autostat.htm#CHDCGJFA. So it’s still worth to draw attention to this interesting functionality.
I really enjoyed your course, it was very inspiring for me. And of course, I’m glad that you like our penguins 🙂
David,
Thanks for the penguin, thanks for your kind comments and thanks for checking the docs!
Now I just need to make sure I have two 11g instances running if I’m going to show that.
Sorry for forgetting your name – I am *terrible* at remembering names – so I’m glad you visited 🙂
Cheers,
Doug
Hi Doug,
I read this when it was first posted and having just had a requirement to move AWR data for analysis have come back (via google) to pick up the details.
This note is just to let you know that this post has been useful to someone and
to encourage you to keep up the good work.
I just wish I had enough time to blog to share my experience…
Hope you are well.
Cheers,
Mat.
Hi Mat,
Thanks very much for the comment. It was weird because it turned up just as I was preparing for a day teaching at Amis and I was deciding not to include this stuff.
Changed my mind after your comment and it was obviously a good decision!
Cheers,
Doug