Oracle的awr报表分析数据库性能

早上群里喊数据库挂了,开始阶段服务登录不上,等登录系统后发现系统负载很高。

运行的oracle服务,今天就用oracle的awr作了一把分析,步骤如下:

一、登录数据库

[root@iZ233j4mpnbZ ~]# su - oracle

[oracle@iZ233j4mpnbZ ~]$ sqlplus sys as sysdba

 

SQL*Plus: Release 11.2.0.1.0 Production on Tue Jun 21 14:36:31 2016

 

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

 

Enter password: 

 

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脚本文件

SQL> @?/rdbms/admin/awrrpt.sql

 

Current Instance

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

 

   DB Id    DB Name Inst Num Instance

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

  745948352 XFIREORC1 xfireorc

 

 

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'

#输入文件类型,默认为html

Enter value for report_type: html

 

Type Specified:  html

 

 

Instances in this Workload Repository schema

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

 

   DB Id     Inst Num DB Name   InstanceHost

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

* 745948352    1 XFIREORC   xfireorciZ233j4mpnbZ

 

Using  745948352 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 <return> 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

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

xfireorc     XFIREORC       9501 21 Jun 2016 00:00   1

      9502 21 Jun 2016 01:00   1

      9503 21 Jun 2016 02:00   1

      9504 21 Jun 2016 03:00   1

      9505 21 Jun 2016 04:01   1

      9506 21 Jun 2016 05:00   1

      9507 21 Jun 2016 06:00   1

      9508 21 Jun 2016 07:00   1

      9509 21 Jun 2016 08:00   1

      9510 21 Jun 2016 09:00   1

      9511 21 Jun 2016 10:00   1

      9512 21 Jun 2016 11:00   1

      9513 21 Jun 2016 12:00   1

      9514 21 Jun 2016 13:00   1

      9515 21 Jun 2016 14:00   1

 

 

 #对应的输入编号,指定分析一个具体时间段内的快照。

Specify the Begin and End Snapshot Ids

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

Enter value for begin_snap: 9511

Begin Snapshot Id specified: 9511

 

Enter value for end_snap: 9512

End   Snapshot Id specified: 9512

 

 

 

Specify the Report Name

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

The default report file name is awrrpt_1_9511_9512.html.  To use this name,

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

 #输入文件名

Enter value for report_name: report10-11

 

Using the report name report10-11

三、分析

将输出的报告,拷贝到本地进行分析。里边的内容有很多,但是真的很强大。也很易懂。

1、分析单条语句造成的Physical Reads(物理读)次数


2、分析语句占用cpu的总的时间

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ORACLE 健康检查与性能分析报告,内容包括: 1: 报告综述..........................................................................................................3 1.1 目的说明....................................................................................... 3 1.2 Server整体状况............................................................................. 3 2: 主机与数据库配置...............................................................................................4 2.1 主机配置.......................................................................................... 4 3: 操作系统可用性..................................................................................................5 3.1 文件系统使用状况............................................................................... 5 3.2 操作系统性能分析............................................................................... 5 4: 数据库可用性....................................................................................................7 4.1 Database Session Chart................................................................. 7 4.2 日志文件状态..................................................................................... 7 4.3 控制文件状态..................................................................................... 9 4.4 归档日志状态................................................................................... 10 4.5 表空间使用状况................................................................................ 10 4.6 数据库文件读写状况.......................................................................... 11 4.7 Invalid Objects............................................................................ 12 4.8 Disabled Triggers ........................................................................ 12 4.9 数据库备份状况................................................................................ 13 4.10 数据库恢复................................................................................... 13 5: 数据库性能分析..............................................................................

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值