Table of Contents
概况
首先说下快照的管理。
查看已生成快照列表信息
手动生成snapshot。
手动删除snapshot。
更改snapshot频率等参数。
生成awr报告。
Home Database Mysql Tutorial 生成awr报告

生成awr报告

Jun 07, 2016 pm 04:06 PM
http main Report document generate

主要参考文档: http://343766868.blog.163.com/blog/static/48314056201110124513396/ 概况 Oracle内部以一定的频率把系统关键的统计信息和负载情况存储起来,生成snapshot(快照),所有的snapshot存储在awr中,即automatic workload repository。 当发现

主要参考文档:

http://343766868.blog.163.com/blog/static/48314056201110124513396/

概况

Oracle内部以一定的频率把系统关键的统计信息和负载情况存储起来,生成snapshot(快照),所有的snapshot存储在awr中,即automatic workload repository。

当发现数据库出现性能问题时,就可以抽取存储在awr中的snapshot信息,生成在指定时间段内(即你指定的snapshot所囊括的时间段)的awr报告。然后对报告进行分析,发现系统存在的问题。

首先说下快照的管理。

查看已生成快照列表信息

Select * from dba_hist_snapshot;

一般情况下,snapshot不需要手动管理,若有特殊需要,也可以进行手动生成和删除操作。

手动生成snapshot。

SQL>execdbms_workload_repository.create_snapshot();

手动删除snapshot。

SQL>exec dbms_workload_repository.dorp(low_snap_id=>1,high_snap_id=>2);

更改snapshot频率等参数。

数据库默认是每一个小时进行一次snapshot生成操作,每个snapshot保留7天。

可以通过以下语句查询数据库当前的快照生成配置信息。

select * from dba_hist_wr_control;

若需要更改次默认参数,也可以使用

SQL>exec dbms_workload_repository.modify_snapshot_settings(interval=>60

Retention=>3*24*60

);

其中:

retention参数及保留时间,单位是min(分钟)。若设置为0,则快照将永久保留。若设置为null,则保留原设置。此参数的范围为1天---100年。

Interval参数为生成snapshot频率。单位是min(分钟)。若设置为0,则表示禁用手动和自动生成快照的功能。若设置为null,则保留原设置。此参数的范围为10min---1年。

此外还有topnsql和dbid参数,topnsql表示要采集比较占资源的sql数量。

生成awr报告。

了解了快照之后,就可以利用snapshot生成awr报告。

自动生成是使用OEM中的查看awr相关项,手动生成时指执行oracle提供的执行脚本。

脚本位于$ORACLE_HOME/rdbms/admin/目录下,名字为awrrpt.sql。

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

即可。生成的路径为你进入sqlplus前的当前目录。所以若要把报告放在指定目录,可事先进入该目录,比如

Cd /tmp/awr/

然后在进入sqlplus,手动生成awr报告。

生成awr报告后,就剩下分析awr报告了,这是个比较大的问题,也是个比较难的问题,以后慢慢说。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1663
14
PHP Tutorial
1266
29
C# Tutorial
1237
24
Insufficient memory or disk space to repagin or print this document Word error Insufficient memory or disk space to repagin or print this document Word error Feb 19, 2024 pm 07:15 PM

This article will introduce how to solve the problem of insufficient memory or disk space to repage or print the document in Microsoft Word. This error usually occurs when users try to print a Word document. If you encounter a similar error, please refer to the suggestions provided in this article to resolve it. Insufficient memory or disk space to repage or print this document Word error How to resolve the Microsoft Word printing error "There is not enough memory or disk space to repage or print the document." Update Microsoft Office Close memory-hogging applications Change your default printer Start Word in safe mode Rename the NorMal.dotm file Save the Word file as another

How to add redline to Word document How to add redline to Word document Mar 01, 2024 am 09:40 AM

It is 395 words, which is 495. This article will show you how to add red lines in Word documents. Redlining a document refers to making modifications to the document so that users can clearly see the changes. This feature is very important when multiple people are editing a document together. What redline means Marking a document Redlining means using red lines or callouts to indicate changes, edits, or revisions to a document. The term was inspired by the practice of using a red pen to mark printed documents. Redline comments are widely used in different scenarios, such as clearly showing recommended changes to authors, editors, and reviewers when editing a document. Propose changes and modifications in legal agreements or contracts Provide constructive criticism and suggestions on papers, presentations, etc. How to give W

Can't open hyperlink in word document Can't open hyperlink in word document Feb 18, 2024 pm 06:10 PM

In recent years, with the continuous development of network technology, our lives are inseparable from various digital tools and the Internet. When processing documents, especially in writing, we often use word documents. However, sometimes we may encounter a difficult problem, that is, the hyperlink in the word document cannot be opened. This issue will be discussed below. First of all, we need to make it clear that hyperlinks refer to links added in word documents to other documents, web pages, directories, bookmarks, etc. When we click on these links, I

Understand common application scenarios of web page redirection and understand the HTTP 301 status code Understand common application scenarios of web page redirection and understand the HTTP 301 status code Feb 18, 2024 pm 08:41 PM

Understand the meaning of HTTP 301 status code: common application scenarios of web page redirection. With the rapid development of the Internet, people's requirements for web page interaction are becoming higher and higher. In the field of web design, web page redirection is a common and important technology, implemented through the HTTP 301 status code. This article will explore the meaning of HTTP 301 status code and common application scenarios in web page redirection. HTTP301 status code refers to permanent redirect (PermanentRedirect). When the server receives the client's

Word document is blank when opening on Windows 11/10 Word document is blank when opening on Windows 11/10 Mar 11, 2024 am 09:34 AM

When you encounter a blank page issue when opening a Word document on a Windows 11/10 computer, you may need to perform repairs to resolve the situation. There are various sources of this problem, one of the most common being a corrupted document itself. Furthermore, corruption of Office files may also lead to similar situations. Therefore, the fixes provided in this article may be helpful to you. You can try to use some tools to repair the damaged Word document, or try to convert the document to another format and reopen it. In addition, checking whether the Office software in the system needs to be updated is also a way to solve this problem. By following these simple steps, you may be able to fix Word document blank when opening Word document on Win

Detailed explanation of Word document operation: merge two pages into one Detailed explanation of Word document operation: merge two pages into one Mar 26, 2024 am 08:18 AM

Word documents are one of the most frequently used applications in our daily work and study. When working with documents, you may sometimes encounter a situation where you need to merge two pages into one. This article will introduce in detail how to merge two pages into one page in a Word document to help readers handle document layout more efficiently. In Word documents, the operation of merging two pages into one is usually used to save paper and printing costs, or to make the document more compact and neat. The following are the specific steps to merge two pages into one: Step 1: Open the Word that needs to be operated

What to do if the word directory is generated incorrectly What to do if the word directory is generated incorrectly Feb 20, 2024 am 08:08 AM

What to do if word table of contents is generated incorrectly. With the development of technology, electronic documents have become an indispensable part of our daily work and study. When editing electronic documents, especially long articles or papers, the generation of a table of contents is a very important step. The table of contents can make it easier for readers to find the content and structure of the article and improve reading efficiency. However, sometimes we encounter some problems in the process of generating the catalog, such as catalog generation errors, disordered order, etc. So, if the word directory is generated incorrectly, how should we solve it? head

How to implement HTTP streaming using C++? How to implement HTTP streaming using C++? May 31, 2024 am 11:06 AM

How to implement HTTP streaming in C++? Create an SSL stream socket using Boost.Asio and the asiohttps client library. Connect to the server and send an HTTP request. Receive HTTP response headers and print them. Receives the HTTP response body and prints it.

See all articles