SQL> @? /Rdbms/admin/awrextr. SQL ~~~~~~~~~~~~~ AWR EXTRACT ~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ This script will extract the AWR data for a range of snapshots ~ ~ Into a dump file. The script will prompt users for ~ ~ 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: '000000'. To use this Database id, press <return> to continue, otherwise enter an alternative. Enter value for dbid:3248492087 -- enter the dbid of the awr database to export Using 3248492087 for Database ID Specify the number of days of snapshots to choose from ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~ Entering the number of days (n) will result in the most recent (N) days of snapshots being listed. Pressing <return> Specifying a number lists all completed snapshots. Enter value for num_days:1 -- enter the number of days to export AWR data Listing the last day's Completed Snapshots DB Name Snap Id Snap Started --------------------------------------- INFADB 612 03 Aug 2014 613 03 Aug 2014 614 03 Aug 2014 615 03 Aug 2014 616 03 Aug 2014 617 03 Aug 2014 618 03 Aug 2014 619 03 Aug 2014 620 03 Aug 2014 621 03 Aug 2014 Specify the Begin and End Snapshot Ids ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Enter value for begin_snap:612 -- Select Start snap_id Begin Snapshot Id specified: 612 Enter value for end_snap:620 -- select end snap_id 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/Cr/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 name for storing and exporting dump files 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 this name, press <return> to continue, otherwise enter An alternative. Enter value for file_name:Awr_dump_612_620 -- enter the dump file name. Note that the. dmp suffix is included. Using the dump file prefix: awr_dump_612_620 | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ | The AWR extract dump file will be located | In the following directory/file: |/U01/awr_extr |Awr_dump_612_61_dmp -- the dump file name is automatically suffixed with. dmp. | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ | | *** AWR Extract Started... | | This operation will take a few moments. | Progress of the AWR extract operation can be | Monitored in the following directory/file: |/U01/awr_extr | Awr_dump_612_61_log | End of AWR Extract SQL> |