ITPub博客

首页 > Linux操作系统 > Linux操作系统 > AWR导出

AWR导出

原创 Linux操作系统 作者:gaiguoxiang 时间:2012-05-20 13:31:06 0 删除 编辑

今天有学会使用一个脚本,可以把AWR全部导出。目的很简单,就是在客户那里不用分析一个取一个、分析一个取一个。先在可以一起都取回来慢慢去研究,真的不错。下面来演示整个过程:

------------------------------导出-------------------------------------

SQL>@?/rdbms/admin/awrextr
~~~~~~~~~~~~~
AWR EXTRACT

………………………………………………………………


* 1275817864 ORCL WIN-4CO7R8IQ
2DV

The default database id is the local one: '1275817864'. To use this
database id, press to continue, otherwise enter an alternative.

输入 dbid 的值:1275817864

Using 1275817864 for Database ID


………………………………………………


输入 num_days 的值:1

Listing the last day's Completed Snapshots

DB Name Snap Id Snap Started
------------ --------- ------------------
ORCL 397 03 8月 2011 15:32
398 03 8月 2011 17:00


Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
输入 begin_snap 的值:397
Begin Snapshot Id specified: 397

输入 end_snap 的值:398
End Snapshot Id specified: 398



…………………………

输入 directory_name 的值:DATA_PUMP_DIR

Using the dump directory: DATA_PUMP_DIR

………………………………………………

输入 file_name 的值:ggx

Using the dump file prefix: ggx
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| The AWR extract dump file will be located

………………………………………………………………
| d:\app\Administrator\admin\orcl\dpdump\
| ggx.log
|

End of AWR Extract

-----------------------------------导入-------------------------------

SQL>@?/rdbms/admin/awrload
~~~~~~~~~~
AWR LOAD
……………………………………………………

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

输入 directory_name 的值:DATA_PUMP_DIR

Using the dump directory: DATA_PUMP_DIR

Specify the Name of the Dump File to Load
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please specify the prefix of the dump file (.dmp) to load:

输入 file_name 的值:GGX

…………………………………………
The default staging schema name is AWR_STAGE.
To use this name, press to continue, otherwise enter
an alternative.

输入 schema_name 的值:AWR_STAGE_1

Using the staging schema name: AWR_STAGE_1

…………………………………………


GGX1 PERMANENT
SYSAUX PERMANENT *
TEBS PERMANENT
USERS PERMANENT

Pressing will result in the recommended default
tablespace (identified by *) being used.

输入 default_tablespace 的值:GGX

Using tablespace GGX as the default tablespace for the AWR_STAGE_1

……………………
------------------------------ --------- -----------------------
TEMP TEMPORARY *

Pressing will result in the database's default temporary
tablespace (identified by *) being used.

输入 temporary_tablespace 的值:TEMP

Using tablespace TEMP as the temporary tablespace for AWR_STAGE_1


... Creating AWR_STAGE_1 user

|
………………………………………………………………………………
| GGX.log

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25517773/viewspace-730294/,如需转载,请注明出处,否则将追究法律责任。

上一篇: swap修改
下一篇: oracle 表空间
请登录后发表评论 登录
全部评论

注册时间:2011-06-22

  • 博文量
    41
  • 访问量
    110398