Oracle AWR跨库导出导入

本文档分为如下几个部分

1.AWR导出awrextr.sql

2.AWR导入awrload.sql

3.为导入awr生成报告awrrpti.sql

4.删除导入的AWR数据dbms_workload_repository.DROP_SNAPSHOT_RANGE

说明:

其实导出脚本awrextr.sql/awrload.sql,是创建了expdp/impdp作业,可以通过v$datapump_jobs视图查询。

 

(1)导出

 

SYS@honor1 > @?/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
------------ ------------ ------------
* 353046371  HONOR        db-oracle-no
                          de1.cloud.la
                          b.eng.bos.re
                          dhat.com
* 353046371  HONOR        db-oracle-no
                          de2.cloud.la
                          b.eng.bos.re
                          dhat.com
The default database id is the local one: '                               353046371'.  To use this
database id, press <return> to continue, otherwise enter an alternative.
Enter value for dbid: 
Using                                353046371 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: 5
Listing the last 5 days of Completed Snapshots
DB Name        Snap Id    Snap Started
------------ --------- ------------------
HONOR             1207 05 Apr 2020 01:56
                  1208 05 Apr 2020 09:38
                  1209 05 Apr 2020 11:00
    
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值