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

2014-11-24 17:28:21 · 作者: · 浏览: 3
LESPACE_NAMECONTENTS


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


DEFAULT TEMP TABLESPACE


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


STATSPACKTEMPTEMPORARY




TEMPTEMPORARY


*




Pressing willresult in the database's default temporary


tablespace (identified by *)being used.



Enter value fortemporary_tablespace: TEMP



Using tablespace TEMP as thetemporary tablespace for AWRUSE




... Creating AWRUSE user



|


|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


|Loading the AWR data from the following


|directory/file:


|/u01/dir


|AWREXPIMP.dmp


|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


|


|*** AWR Load Started ...


|


|This operation will take a few moments. The


|progress of the AWR load operation can be


|monitored in the following directory/file:


|/u01/dir


|AWREXPIMP.log


|


begin


*


ERROR at line 1:


ORA-20105: unable to move AWRdata to SYS


ORA-06512: at"SYS.DBMS_SWRF_INTERNAL", line 2950


ORA-20107: not allowed tomove AWR data for local dbid


ORA-06512: at line 3




... Dropping AWRUSE user



End of AWR Load


00:17:56 sys@felix SQL>




Schaema小插曲:schema名称必须是oracle数据库中不存在的,不然会异常退出:



*************************************************************************************************************************************************************


导出AWRdump文件:



23:50:40 sys@felixSQL>createuser awrexp identified byoracle account unlock;



User created.




23:52:41 sys@felixSQL>grantdba to awrexp;



Grant succeeded.



00:11:46 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:AWREXPEMP



Loading from the file name:AWREXPEMP.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