AWR元数据的迁移或导入到其它数据库

我们能够将AWR元数据迁移(导入)到其它数据库。低版本号的导入到高版本号,再用高版本号的数据库生成AWR报告,也能使用一些新特性,如

SQL ordered by Physical Reads (UnOptimized)

SQL ordered by User I/O Wait Time

导出

testnode:/home/oracle$export ORACLE_SID=wy1

testnode:/home/oracle$sqlplus / as sysdba

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

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

* 3988169241 WY           testnode1

* 3988169241 WY           testnode2

The default database id is the local one: ‘3988169241‘.  To use this

database id, press <return> to continue, otherwise enter an alternative.

Enter value for dbid:

Using 3988169241 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:

Listing all Completed Snapshots

...

DB Name        Snap Id    Snap Started

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

WY                4706 18 Mar 2015 18:00

4707 18 Mar 2015 19:00   <<<

4708 18 Mar 2015 20:00   <<<

Specify the Begin and End Snapshot Ids

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

Enter value for begin_snap: 4707    <<<<起始SNAP

Begin Snapshot Id specified: 4707   <<<<结束SNAP

Enter value for end_snap: 4708

End   Snapshot Id specified: 4708

Specify the Directory Name

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

Directory Name                 Directory Path

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

DATA_PUMP_DIR                  /u01/app/oracle/product/11.2.0/db_1/rdbms/log/

EXPDP                          /tmp/expdp       <<<<<<<<<<<<<<<<

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

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

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

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

Enter value for directory_name: EXPDP   <<<<<<<<<输入DIRECTORY,右边是文件夹所相应的物理路径.注: 假设SNAP跨度大,须要较大的空间来存放文件

Using the dump directory: EXPDP

Specify the Name of the Extract Dump File

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

The prefix for the default dump file name is awrdat_4707_4708.

To use this name, press <return> to continue, otherwise enter

an alternative.

Enter value for file_name:

Using the dump file prefix: awrdat_4707_4708

|

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

|  The AWR extract dump file will be located

|  in the following directory/file:

|   /tmp/expdp                <<<<文件夹

|   awrdat_4707_4708.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:

|   /tmp/expdp

|   awrdat_4707_4708.log

|

导入:

导入过程也类似

SQL> @?/rdbms/admin/awrload

~~~~~~~~~~

AWR LOAD

~~~~~~~~~~

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

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

~  script will prompt users for the following information:    ~

~     (1) name of directory object         ~

~     (2) name of dump file          ~

~     (3) staging schema name to load AWR data into       ~

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

Specify the Directory Name

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

Directory Name         Directory Path

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

AGREE_AWRREPORT_DIR        /tmp/xunjian

DATA_PUMP_DIR         /u01/app/oracle/admin/orcl/dpdump/

EXPDP          /arch/expdp       <<<<<<<<<<<<<<<<<<<<<<

ORA10G_PUMP         /u01/app/oracle/datapump/ora10g

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

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

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

Enter value for directory_name: EXPDP  <<<<<<<<<<<<<<<<输入DIRECTORY名称

Using the dump directory: EXPDP

Specify the Name of the Dump File to Load

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

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

Enter value for file_name: awrdat_4707_4708        <<<<<<<<<<<<<<<输入文件名称(不包括后缀.dmp)

Loading from the file name: awrdat_4707_4708.dmp

Staging Schema to Load AWR Snapshot Data

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

The next step is to create the staging schema

where the AWR snapshot data will be loaded.

After loading the data into the staging schema,

the data will be transferred into the AWR tables

in the SYS schema.

The default staging schema name is AWR_STAGE.

To use this name, press <return> to continue, otherwise enter

an alternative.

Enter value for schema_name:          <<<<<<<<<<<<<<回车,取默认值

Using the staging schema name: AWR_STAGE

Choose the Default tablespace for the AWR_STAGE user

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

Choose the AWR_STAGE users‘s default tablespace.  This is the

tablespace in which the AWR data will be staged.

TABLESPACE_NAME

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

CONTENTS      DEFAULT TABLESPACE

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

SYSAUX

PERMANENT      *

USERS

PERMANENT

Pressing <return> will result in the recommended default

tablespace (identified by *) being used.

Enter value for default_tablespace:          <<<<<<<<<<<<<回车,取默认值

Using tablespace SYSAUX as the default tablespace for the AWR_STAGE

Choose the Temporary tablespace for the AWR_STAGE user

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

Choose the AWR_STAGE user‘s temporary tablespace.

TABLESPACE_NAME

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

CONTENTS      DEFAULT TEMP TABLESPACE

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

TEMP

TEMPORARY      *

Pressing <return> will result in the database‘s default temporary

tablespace (identified by *) being used.

Enter value for temporary_tablespace:          <<<<<<<<<<<<<回车,取默认值

Using tablespace TEMP as the temporary tablespace for AWR_STAGE

... Creating AWR_STAGE user

|

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

|  Loading the AWR data from the following

|  directory/file:

|   /arch/expdp

|   awrdat_4707_4708.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:

|   /arch/expdp

|   awrdat_4707_4708.log

|

...

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

道行尚浅,欢迎拍砖。

转载请注明出处.

时间: 2024-08-29 07:24:53

AWR元数据的迁移或导入到其它数据库的相关文章

AWR元数据的迁移或导入到其他数据库

我们可以将AWR元数据迁移(导入)到其他数据库,低版本的导入到高版本,再用高版本的数据库生成AWR报告,也能使用一些新特性,如 SQL ordered by Physical Reads (UnOptimized) SQL ordered by User I/O Wait Time 导出: testnode:/home/oracle$export ORACLE_SID=wy1 testnode:/home/oracle$sqlplus / as sysdba SQL> @?/rdbms/admi

VMware vSphere(迁移和导入VM)(九)

在vsphere中 要把vm迁移和导入 必须安装以下2个工具 这2个组件的具体功能如下图 然后点确定 一路下一步 安装完成后 会看见如图下 然后一直下一步 要不物理主机加入域 方便收集 看多了个插件 然后选择导入哪台esxi主机上 就行了!然后就可以看到真机再esxi里面了 注意: 2.那个分析不是马上就有的 估计是要几天时间 只要看到可行度为高 就可以导入了 冷迁移 我们这里就做不鸟实验了  大家有空百度下吧 然后就可以导入了 好了 今天教程就到这里 VMware vSphere(迁移和导入V

一步步实现ABAP后台导入EXCEL到数据库【1】

在SAP的应用当中,导入.导出EXCEL文件的情况是一个常见的需求,有时候用户可能有大量的数据需要定期导入到SAP的数据库中.这种情况下,使用导入程序在前台导入可能要花费不少的时间,如果能安排导入程序为后台作业,既可以节约用户的时间,也可以有效利用闲时的服务器资源.下面来介绍一下相关的知识和具体实践办法. 本文链接:http://www.cnblogs.com/hhelibeb/p/5912330.html 原创内容,转载请注明 1,定义结构 首先,准备一个EXCEL文件.假设一个相对简单的情景

用 BigDump 工具导入超大 MySQL 数据库备份文件

用 BigDump 工具导入超大 MySQL 数据库备份文件  创建于 2010-07-01, 周四 00:00  作者 白建鹏 在<Joomla! 1.5 网站防黑9条戒律>这篇文章中,我们提到的第一条就是:及时.定期备份你的 Joomla! 网站.我们也多次推荐使用Akeeba Backup (原名 JoomlaPack)这个备份工具.Akeeba Backup 自带的 kickstart.php 工具也能完成备份包的恢复(或者迁移安装).不过,这是针对整站的恢复.假如我们只是要恢复一下数

PL/SQLDeveloper导入导出Oracle数据库方法

前一篇博客介绍了Navicat工具备份Oracle的方法,这篇博客介绍一下使用PL/SQL Developer工具导入导出Oracle数据库的方法. PL/SQL Developer是Oracle数据库用于导入导出数据库的主要工具之一,本文主要介绍利用PL/SQL导入导出Oracle数据库的过程. 1.Oracle数据库导出步骤 1.1 Tools→Export User Objects...选项,导出.sql文件. 说明:此步骤导出的是建表语句(包括存储结构). 1.2 Tools→Expor

导入MySQL测试数据库employee报错

导入MySQL测试数据库employee 报错 下载地址:https://launchpad.net/test-db/ 上传解压: [[email protected] ~]# tar xf employees_db-full-1.0.6.tar.bz2 [[email protected] ~]# cd employees_db 使用mysql命令行工具,导入建库建表语句和数据 employee.sql中是建库建表语句,默认使用的是InnoDB引擎,可以自行修改 [[email protect

[转]PL/SQLDeveloper导入导出Oracle数据库方法

原文地址:http://www.2cto.com/database/201405/305452.html 1.Oracle数据库导出步骤 1.1 Tools→Export User Objects...选项,导出.sql文件. 说明:此步骤导出的是建表语句(包括存储结构),不包括表中的数据,要导出数据需要用Tools→Export Tables. 1.2 Tools→Export Tables...导出表结构及数据 PL/SQL工具包含三种方式导出Oracle表结构及数据,三种方式分别为:Ora

PHP:phpMyAdmin如何解决本地导入文件(数据库)为2M的限制

经验地址:http://jingyan.baidu.com/article/e75057f2a2288eebc91a89b7.html 当我们从别人那里导出数据库在本地导入时,因为数据库文件大于2M而在phpMyAdmin导入时无法导入,主要原因是phpMyAdmin限制导入文件最大为2M,那么怎样解决呢? ******该方法为本地导入方法,虚拟主机的暂且不能******** 第一步,在PHP.ini配置文件中找到uplod_max_filesize,将默认的2M改为自己要导入文件的大小,如15

mysqldump导入导出mysql数据库

body{ font-family: "Microsoft YaHei UI","Microsoft YaHei",SimSun,"Segoe UI",Tahoma,Helvetica,Sans-Serif,"Microsoft YaHei", Georgia,Helvetica,Arial,sans-serif,宋体, PMingLiU,serif; font-size: 10.5pt; line-height: 1.5;}