进入到$ORACLE_HOME/rdbms/admin目录下。

然后sqlplus "/as sysdba"登陆到数据库

执行@awrrpt.sql;

[oracle@appdb2 admin]$ cd $ORACLE_HOME/rdbms/admin

[oracle@appdb2 admin]$ sqllus / as sysdba

-bash: sqllus: command not found

[oracle@appdb2 admin]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Mon Jul 21 17:21:09 2014

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

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> @awrrpt.sql;

Current Instance

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

DB Id    DB Name      Inst Num Instance

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

3565904331 DEMO                1 demo

Specify the Report Type

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

Would you like an HTML report, or a plain text report?

Enter 'html' for an HTML report, or 'text' for plain text

Defaults to 'html'

Enter value for report_type:

Specify the Report Type

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

Would you like an HTML report, or a plain text report?

Enter 'html' for an HTML report, or 'text' for plain text

Defaults to 'html'

Enter value for report_type: 1

Type Specified:  1

Instances in this Workload Repository schema

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

DB Id     Inst Num DB Name      Instance     Host

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

* 3565904331        1 DEMO         demo         appdb2.fleet

y.com

Using 3565904331 for database Id

Using          1 for instance number

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 without

specifying a number lists all completed snapshots.

Enter value for num_days: 1

Listing the last day's Completed Snapshots

Snap

Instance     DB Name        Snap Id    Snap Started    Level

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

demo         DEMO              8612 21 Jul 2014 00:00      1

8613 21 Jul 2014 01:00      1

8614 21 Jul 2014 02:00      1

8615 21 Jul 2014 03:00      1

8616 21 Jul 2014 04:00      1

8617 21 Jul 2014 05:00      1

8618 21 Jul 2014 06:00      1

8619 21 Jul 2014 07:00      1

8620 21 Jul 2014 08:00      1

8621 21 Jul 2014 09:00      1

8622 21 Jul 2014 10:00      1

8623 21 Jul 2014 11:00      1

8624 21 Jul 2014 12:00      1

8625 21 Jul 2014 13:00      1

8626 21 Jul 2014 14:00      1

8627 21 Jul 2014 15:00      1

8628 21 Jul 2014 16:00      1

8629 21 Jul 2014 17:00      1

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

oracle查看语句执行历史,AWT查看oracle历史sql语句执行相关推荐

  1. Oracle中如何查找未使用绑定变量的SQL语句?

    Oracle中如何查找未使用绑定变量的SQL语句? 利用V$SQL 视图的 FORCE_MATCHING_SIGNATURE 字段可以识别可能从绑定变量或 CURSOR_SHARING 获益的 SQL ...

  2. oracle创建表语句_利用FME去拼接SQL语句并创建表

    在之前的工作中,我遇到了这么一个需求,需要将数据库内一千多个旧表按其原来表结构,重新创建对应的新表.然后对旧数据的进行处理后,存储新的数据. 不只是结构需要保持一致,还有用户.表空间.约束.备注等也需 ...

  3. 创建oracle 数据库表空间,角色,用户的sql语句

    创建oracle 数据库表空间,角色,用户的sql语句 1.创建角色 CREATE ROLE "QIUDINGROLE" NOT IDENTIFIED; GRANT "C ...

  4. mysql sql执行过程_MySQL探秘(二):SQL语句执行过程详解

    昔日庖丁解牛,未见全牛,所赖者是其对牛内部骨架结构的了解,对于MySQL亦是如此,只有更加全面地了解SQL语句执行的每个过程,才能更好的进行SQL的设计和优化. 当希望MySQL能够以更高的性能运行查 ...

  5. oracle 等待原因查找,查询引起锁等待的SQL语句

    本帖最后由 bfc99 于 2014-9-22 17:34 编辑 主要通过四个性能视图: 1.v$locked_object  查看当前哪些对象上有锁,及其所属的会话. 2.v$session_blo ...

  6. 【C# .NET】Oracle数据库连接的坑之传入parameters参数名SQL语句中的参数变量名不匹配(顺序不一致)的问题

    问题描述 有一个user表,需要修改id为10086的用户的姓名和年龄,在C#的后台这样写: using (IDbConnection db = DapperFactory.GetConnection ...

  7. mysql查看cpu使用高sql语句_查询CPU占用高的SQL语句

    触发器造成死锁.作业多且频繁.中间表的大量使用.游标的大量使用.索引的设计不合理.事务操作频繁.SQL语句设计不合理,都会造成查询效率低下.影响服务器性能的发挥.我们可以使用sql server自带的 ...

  8. 软件测试mysql常用语句_测试中常用到的SQL语句(Oracle)

    在测试过程中,可能会进入到数据库中检查数据. 下面列举一些经常用到的SQL语句. (1)删除记录(delete与truncate) 语法:delete from  表名 where 条件 trunca ...

  9. oracle 把结果加上百分号_用一条sql语句显示数据百分比并加百分号

    求数值所占比重 关键点:(round(t1.cnt/t2.totalCount*100,2))||'%' 例子: 如下表所示,车辆信息注册表carInfo ID CAR_TYPE CAR_ONWER ...

最新文章

  1. go语言的channel特性
  2. android 两个竖排listview,Android布局 – 在ListView行内垂直堆叠两个TextView
  3. BZOJ4557:[JLOI2016/SHOI2016]侦察守卫——题解
  4. readdirectorychangesw 链接错误 undeclared identifier 解决方法
  5. 如何用PPT编制方案 (4)PPT中的图形设计
  6. 一张图看懂AI、机器学习和深度学习的区别
  7. java.lang.IllegalStateException: No output folder
  8. mysql截取字符串最后两位_MySQL截取字段中最后两位不想要的字符串 以及截取函数...
  9. oracle经纬度换算成xy坐标,xy坐标转换经纬度【处置步骤】
  10. 阿里褚霸专访-揭秘技术男开挂升级的职业路径(回帖有奖)
  11. java中intern_Java中的intern()方法是什么?
  12. Java高并发处理:请求合并
  13. Transformer Decoder
  14. 使用TWRP Recovery刷入CM13等第三方ROM教程
  15. 区块链知识系列 - 系统学习EVM(二)-存储与安全
  16. Oracle免登录下载JDK(实测有效)
  17. 追忆第一次南下深圳有哪些重大抉择(二)?
  18. 悟道 冥 与 力 万事皆可成
  19. 没想到吧!关于Dubbo的『消费端线程池模型』官网也写错了。
  20. 解决 iPhone X 屏幕底部空白问题

热门文章

  1. 巧用 TypeScript Literal Types 模拟枚举类型
  2. 通过 Feature Level 动态控制 SAP Spartacus 的页面显示
  3. postman和部署在 SAP 云平台上的SAP UI5应用发送同样的HTTP请求,为何前者成功,后者失败?
  4. i18n - why Chinese resource will be loaded by default
  5. SAP S4HANA的product搜索的动态SQL语句的拼接原理
  6. Another way to define Angular controller
  7. SAP Marketing Cloud的sentiment engagement
  8. 解决BDOC structure里header和data structure里数据格式不一致的问题
  9. SAP CRM WebClient UI F4 value help is centrally implemented in CRM_THTMLB_UTIL/F4Frameset.html
  10. SAP UI5是如何从浏览器读取语言设置并按照优先级排序的