抽取AWR数据

使用$ORACLE_HOME/rdbms/admin/awrextr.sql

$ sqlplus ‘/as sysdba‘

SQL*Plus: Release 11.2.0.4.0 Production on Fri Nov 6 13:45:43 2015

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> @$ORACLE_HOME/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
------------ ------------ ------------
* 1302125221 ORCL         oracledb1
* 1302125221 ORCL         oracledb2

The default database id is the local one: ‘1302125221‘.  To use this
database id, press <return> to continue, otherwise enter an alternative.

Enter value for dbid: 1302125221

Using 1302125221 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: 1

Listing the last day‘s Completed Snapshots

DB Name        Snap Id    Snap Started
------------ --------- ------------------
ORCL              5481 06 Nov 2015 00:00
                  5482 06 Nov 2015 01:00
                  5483 06 Nov 2015 02:00
                  5484 06 Nov 2015 03:00
                  5485 06 Nov 2015 04:00
                  5486 06 Nov 2015 05:00
                  5487 06 Nov 2015 06:00
                  5488 06 Nov 2015 07:00
                  5489 06 Nov 2015 08:00
                  5490 06 Nov 2015 09:00
                  5491 06 Nov 2015 10:00

DB Name        Snap Id    Snap Started
------------ --------- ------------------
ORCL              5492 06 Nov 2015 11:00
                  5493 06 Nov 2015 12:00
                  5494 06 Nov 2015 13:00

Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 5489
Begin Snapshot Id specified: 5489

Enter value for end_snap: 5494
End   Snapshot Id specified: 5494

Specify the Directory Name
~~~~~~~~~~~~~~~~~~~~~~~~~~

Directory Name                 Directory Path
------------------------------ -------------------------------------------------
DATA_PUMP_DIR                  /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/log
                               /

DUMPDIR                        /u01/app/oracle/
EXPDP_DIR                      /home/oracle/dump
ORACLE_OCM_CONFIG_DIR          /u01/app/oracle/product/11.2.0/dbhome_1/ccr/hosts
                               /oracledb1/state

ORACLE_OCM_CONFIG_DIR2         /u01/app/oracle/product/11.2.0/dbhome_1/ccr/state
XMLDIR                         /u01/app/oracle/product/11.2.0/dbhome_1/rdbms/xml

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

Enter value for directory_name: DUMPDIR

Using the dump directory: DUMPDIR

Specify the Name of the Extract Dump File
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The prefix for the default dump file name is awrdat_5489_5494.
To use this name, press <return> to continue, otherwise enter
an alternative.

Enter value for file_name: 

Using the dump file prefix: awrdat_5489_5494
|
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|  The AWR extract dump file will be located
|  in the following directory/file:
|   /u01/app/oracle/
|   awrdat_5489_5494.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/app/oracle/
|   awrdat_5489_5494.log
|

End of AWR Extract
SQL> 
时间: 2024-08-02 06:34:17

抽取AWR数据的相关文章

使用Kettle增量抽取MongoDB数据实践

需求: 增量抽取MongoDB数据并加载到MSSQL 由于不能使用关系型数据库的自定义SQL, 所以主要遇到的问题有: 增量时间的查询和参数控制 ETL的批次信息和调用参数的写入 第一个问题的解决如下: 使用命名参数在Query页中进行过滤, 一开始会担心${}的引用方式会用Mongo的语法冲突, 测试后发现运行正常 第二个问题: 先为结果增加常量值, 如常量值固定则直接写死, 不固定的常量值先设置为空串, 在后面使用字符串替换组件传入命名参数, 最后用字段选择把空串的常量值移除

【BW系列】SAP BW实时抽取ECC数据的实现

公众号:SAP Technical 本文作者:matinal 原文出处:http://www.cnblogs.com/SAPmatinal/ 原文链接:[BW系列]SAP BW实时抽取ECC数据的实现 前言部分 大家可以关注我的公众号,公众号里的排版更好,阅读更舒适. 正文部分 BW一般都是对历史数据分析用的 如果模型中需要实时的数据,就要用到这种技术 但这样系统效率很低,一般很少用到,一般公司也不会采用 但是有些客户非要这样的要求,那就开始挖坑吧. 技术实现如下: 用RDA(实时数据抽取)创建

Goldengate抽取ORACLE 数据 到 Hbase

1.        软件版本说明: Goldengate 12c  12.2.0.1 forOracle (源端 ) Goldengate 12c  12.2.0.1  for Bigdata ( 目标端) Oracle 11g 11.2.0.4.0 (注oracle 数据库必须是11.2.0.4之后的版本,之前的oracle 数据库版本不支持ogg 12c ) HBase 1.1.2 Java 1.8.0_91 2.        机器IP 说明 源端IP地址(192.168.45.176)安

【T-SQL】分布抽取部分数据

好吧,我确实不知道该怎么起这个标题,整了一个“分布”,感觉还有点高档,其实没啥技术含量,看完你就知道了.情况是这样,刚刚接到一个临时任务,需要让几个营业点的销售数据[变]少一点,就是在ERP的相关报表中,查询出来的数据要在指定区间,说白了就是那什么~你懂的,某些同行应该对这种任务很熟悉了,而有些同行可能正在或即将面临这样的任务,希望此文能提供一点思路. 我是第一次接到这种任务,感觉蛮新鲜,思量一下,决定在测试库动手脚,完了让他的ERP接入测试库,事情过后再切回正式库,细枝末节就不说了,重点说一下

AWR--导出AWR数据

SQL> create or replace directory expdp_dir as '/home/oracle/dump'; Directory created. SQL> @$ORACLE_HOME/rdbms/admin/awrextr ~~~~~~~~~~~~~ AWR EXTRACT ~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~ This script w

ORACLE AWR报告数据的导入导出实践

关于AWR的快照数据可以导出.导入,一直没有亲手实践过.今天动手测试了一下如何导出.导入AWR数据,将AWR的数据从一测试服务器,导入到另外一台测试服务器. SQL> @?/rdbms/admin/awrextr.sql ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Disclaimer: T

数据抽取工具——DMCTextFilter V4.2(纯文本抽出通用程序库)

DMCTextFilter V4.2是由北京红樱枫软件有限公司研制和开发的纯文本抽出通用程序库产品.本产品可以从各种各样的文档格式的数据中或从插入的OLE对象中,完全除掉特殊控制信息,快速抽出纯文本数据信息.便于用户实现对多种文档数据资源信息进行统一管理,编辑,检索和浏览.本产品采用了先进的多语言.多平台.多线程的设计理念,支持多国语言(英语,中文简体,中文繁体,日本语,韩国语),多种操作系统(Windows,Solaris,Linux,IBM AIX,Macintosh,HP-UNIX),多种

ETL数据抽取

1.ETL:数据抽取 2.抽取数据在不同的数据源之间,把数据进行转化,加载,清洗操作,保证抽取的数据合法. 3.开源实现:Kettle 工具 ==================================================================== 学习: 大家可以学学这个Kettle 工具,通过借鉴这个工具,我们可以自己设计自己的ETL过程,工具很好用,官方自带一些例子:ata-integration\samples. ======================

《BI项目笔记》增量ETL数据抽取的策略及方法

增量抽取 增量抽取只抽取自上次抽取以来数据库中要抽取的表中新增或修改的数据.在ETL使用过程中.增量抽取较全量抽取应用更广.如何捕获变化的数据是增量抽取的关键.对捕获方法一般有两点要求:准确性,能够将业务系统中的变化数据按一定的频率准确地捕获到:性能,不能对业务系统造成太大的压力,影响现有业务.目前增量数据抽取中常用的捕获变化数据的方法有:a.触发器:在要抽取的表上建立需要的触发器,一般要建立插入.修改.删除三个触发器,每当源表中的数据发生变化,就被相应的触发器将变化的数据写入一个临时表,抽取线