SQL> @?/rdbms/admin/awrextr.sql ~~~~~~~~~~~~~ AWR EXTRACT ~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ This script would extract the AWR data for a range of snapshots ~ ~ into a dump file. The script would prompt users for the ~ ~ Following information: ~ ~ (1) Database ID ~ ~ (2) snapshot range to extract ~ ~ (3) Name of directory object ~ ~ (4) Name of dump file ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Databases in this Workload Repository schema ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DB Id db Name Host ------------ ------------ ------------ * 3248492087 infadb INFA 1542553735 Crmout TSRRAC01 1542553735 Crmout TSRRAC02 The default database ID is the local one: ' 3248492087 '. To use this Database ID, press <return> to continue, otherwise enter an alternative. Enter value for dbid: 3248492087 -- Enter the DBI to be exported to the AWR database D Using 3248492087 for Database ID Specify the number of days of snapshots to choose from ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Entering the number of days (n) would result in the most recent (n) days of snapshots being listed. Pressing <return> without Specifying a number lists all completed snapshots. Enter value for num_days: 1 -- Enter The number of days you choose to export the AWR data Listing the last day ' s completed snapshots DB Name snap Id snap Started ------------ --------- ------------------ INFADB 612 2014 00:06 613 2014 00:15 614 2014 00:30 615 2014 00:45 616 2014 01:00 617 2014 01:15 618 2014 01:30 619 2014 01:45 620 2014 02:00 621 2014 02:15 Specify the Begin and End Snapshot Ids ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Enter value for Begin_snap: 612 -- Select Start snap_id number Begin Snapshot Id specified:612 Enter value for END_SNAP: 620 -- Select End snap_id number End Snapshot Id specified:620 Specify the Directory Name ~~~~~~~~~~~~~~~~~~~~~~~~~~ Directory Name Directory Path ------------------------------ ------------------------------------------------- Awr_extr/u01/awr_extr data_pump_dir/dba/oracle/admin/infadb/dpdump/ Expdp_dir/u01/expdp_dir Oracle_ocm_config_dir/dba/oracle/product/11.2.0/db_1/ccr/state Xmldir/dba/oracle/product/11.2.0/db_1/rdbms/xml Choose a Directory Name from the above list (case-sensitive). Enter value for Directory_name: awr_extr -- Enter The directory where the exported dump is stored c6> name Using the Dump DIRECTORY:AWR_EXTR Specify the Name of the Extract Dump File ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The prefix for the default dump file name is awrdat_612_620. To use the this name, press <return> to continue, otherwise enter An alternative. Enter value for file_name: awr_dump_612_620 -- Enter The name of the dump file, as long as the band . DMP suffix Using the dump file prefix:awr_dump_612_620 | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | The AWR extract dump file would be located | In the following directory/file: | /u01/awr_extr | awr_dump_612_620.dmp --dump file name is automatically brought up . dmp suffix | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | AWR Extract Started ... | | This operation would take a few moments. The | Progress of the AWR extract operation can be | Monitored in the following directory/file: | /u01/awr_extr | Awr_dump_612_620.log | End of AWR Extract Sql> |