DUMP的AWR报告如何导入到Oracle详解(二)

2014-11-24 17:28:21 · 作者: · 浏览: 1
~~~~~~~~~~~~~~~~~~~~~~~~~


|The AWR extract dump file will be located


|in the following directory/file:


|/u01/dir


|AWREXPIMP.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/dir


|AWREXPIMP.log


|



End of AWR Extract






1.导入之前需要创建DIREXTORY,将要导入的文件存放到此路径的操作系统目录下:


Create directory data_dir as'/u01/dir';



2.我们使用$ORACLE_HOME/rdbms/admin/awrload.sql脚本加载awr导出的dump文件数据:


00:15:27 sys@felixSQL>@ /rdbms/admin/awrload


~~~~~~~~~~


AWR LOAD


~~~~~~~~~~


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


~This script will load the AWR data from adump file. The~


~script will prompt users for the followinginformation:~


~(1) name of directory object~


~(2) name of dump file~


~(3) staging schema name to load AWR datainto~


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Specify the Directory Name


~~~~~~~~~~~~~~~~~~~~~~~~~~



Directory NameDirectory Path


-------------------------------------------------------------------------------


DATA_FILE_DIR/u01/app/oracle/product/11.2.0/db_1/demo/schema/s


ales_history/



DATA_PUMP_DIR/u01/app/oracle/admin/felix/dpdump/


DATE_DIR/u01/dir


EXP/u01/exp


LOG_FILE_DIR/u01/app/oracle/product/11.2.0/db_1/demo/schema/l


og/



MEDIA_DIR/u01/app/oracle/product/11.2.0/db_1/demo/schema/p


roduct_media/



ORACLE_OCM_CONFIG_DIR/u01/app/oracle/product/11.2.0/db_1/ccr/state


SS_OE_XMLDIR/u01/app/oracle/product/11.2.0/db_1/demo/schema/o


rder_entry/



SUBDIR/u01/app/oracle/product/11.2.0/db_1/demo/schema/o


rder_entry//2002/Sep



XMLDIR/u01/app/oracle/product/11.2.0/db_1/rdbms/xml



Choose a Directory Name fromthe list above (case-sensitive).



Enter value fordirectory_name: DATE_DIR



Using the dump directory:DATE_DIR



Specify the Name of the DumpFile to Load


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Please specify the prefix ofthe dump file (.dmp) to load:



Enter value for file_name:AWREXPIMP



Loading from the file name:AWREXPIMP.dmp



Staging Schema to Load AWRSnapshot Data


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


The next step is to createthe staging schema


where the AWR snapshot datawill be loaded.


After loading the data intothe staging schema,


the data will be transferredinto the AWR tables


in the SYS schema.




The default staging schemaname is AWR_STAGE.


To use this name, press to continue, otherwise enter


an alternative.



Enter value for schema_name:AWRUSE



Using the staging schemaname: AWRUSE



Choose the Default tablespacefor the AWRUSE user


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Choose the AWRUSE users'sdefault tablespace.This is the


tablespace in which the AWRdata will be staged.



TABLESPACE_NAMECONTENTS


------------------------------------------------------------------------------


DEFAULT TABLESPACE


------------------


EXAMPLEPERMANENT




STATSPACKPERMANENT




SYSAUXPERMANENT


*



USERSPERMANENT





Pressing willresult in the recommended default


tablespace (identified by *)being used.



Enter value for default_tablespace:USERS



Using tablespace USERS as thedefault tablespace for the AWRUSE




Choose the Temporarytablespace for the AWRUSE user


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Choose the AWRUSE user'stemporary tablespace.



TAB