首页 技术 正文
技术 2022年11月20日
0 收藏 504 点赞 2,882 浏览 2530 个字

【第一步】找到awrrpt.sql文件

[ora11g@vm-kvm11820-app ~]$ locate awrrpt.sql
/DATA/opt/app/ora11g/product/11.2./rdbms/admin/awrrpt.sql

【第二步】进入数据库

[ora11g@vm-kvm11820-app ~]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.4.0 Production on Thu Apr 4 09:50:09 2019Copyright (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, OLAP, Data Mining and Real Application Testing optionsSQL>

【第三步】设置开始、结束时间点

SQL> exec DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT ();   #在加压后执行该指令设置开始时间点SQL> exec DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT ();  #在加压结束后执行该指令设置结束时间点

【第四步】执行awrrpt.sql文件

SQL> @/DATA/opt/app/ora11g/product/11.2.0/rdbms/admin/awrrpt.sqlCurrent Instance
~~~~~~~~~~~~~~~~ DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
2557964726 LDPBACKQ 1 ldpbackqSpecify 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:

【第五步】

Enter value for report_type: htmlType Specified:  htmlInstances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 2557964726 1 LDPBACKQ ldpbackq vm-kvm11820-
appUsing 2557964726 for database Id
Using 1 for instance numberSpecify 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:
Enter value for num_days: 1      #1,当天Listing the last day's Completed Snapshots                            Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
ldpbackq LDPBACKQ 11266 04 Apr 2019 00:00 1
11267 04 Apr 2019 01:00 1
11268 04 Apr 2019 02:00 1
11269 04 Apr 2019 03:00 1
11270 04 Apr 2019 04:00 1
11271 04 Apr 2019 05:00 1
11272 04 Apr 2019 06:00 1
11273 04 Apr 2019 07:00 1
11274 04 Apr 2019 08:00 1
11275 04 Apr 2019 09:00 1
11276 04 Apr 2019 09:47 1    #可以发现,此处有两个非整点的时间点,就是由之前第三步指令所生成的时间点
11277 04 Apr 2019 09:55 1Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap:
Enter value for begin_snap: 11276      #输入起始时间
Begin Snapshot Id specified: 11276Enter value for end_snap: 11277      #结束时间
End Snapshot Id specified: 11277Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_11276_11277.html. To use this name,
press <return> to continue, otherwise enter an alternative.Enter value for report_name:
Enter value for report_name: test.html    #为awr报告命名
......
Report written to test.html      #生成结束,请自行查找文件位置
SQL>
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:8,983
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,500
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,343
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,127
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,760
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,796