|
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 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 --輸入需匯出AWR資料庫的DBID
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> without
specifying a number lists all completed snapshots.
Enter value for num_days: 1 --輸入需要匯出AWR資料所選擇的天數
Listing the last day's Completed Snapshots
DB Name Snap Id Snap Started
------------ --------- ------------------
INFADB 612 03 Aug 2014 00:06
613 03 Aug 2014 00:15
614 03 Aug 2014 00:30
615 03 Aug 2014 00:45
616 03 Aug 2014 01:00
617 03 Aug 2014 01:15
618 03 Aug 2014 01:30
619 03 Aug 2014 01:45
620 03 Aug 2014 02:00
621 03 Aug 2014 02:15
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 612 --選擇開始snap_id號
Begin Snapshot Id specified: 612
Enter value for end_snap: 620 --選擇結束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/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 --輸入存放匯出dump檔的directory名稱
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 --輸入dump檔名稱,注意只要帶.dmp尾碼
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_620.dmp --dump檔案名稱自動帶上了.dmp尾碼
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| *** AWR Extract Started ...
|
| This operation will 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> |