Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

21

积分

0

好友

5

主题
1#
发表于 2013-4-22 17:20:02 | 查看: 3596| 回复: 5
问 grid control 11g 以及em12c 安装后历史数据保留多久,在哪设置? 哪个文档里介绍了?
谢谢!
2#
发表于 2013-4-22 18:46:42
一般31天,应该是内部有地方设置,没见到有能在console中设置的。

回复 只看该作者 道具 举报

3#
发表于 2013-4-22 18:58:55
参考这个文档吧

Grid Control Repository: How to Modify the Retention and Purging Policies for Metric Data? [ID 430830.1]

Enterprise Manager Base Platform - Version 10.2.0.2 to 11.1.0.1 [Release 10.2 to 11.1]
Information in this document applies to any platform.
***Checked for relevance on 26-08-2012***
Goal

The metric data that is collected and uploaded by the Agents on the targets hosts is called the 'raw' data, which is stored by the OMS into the repository tables. One of the DBMS_Job's (Rollup job) in the Repository is reponsible for rolling up / aggregating this raw data into 1Hour metric tables, which are further rolled up into 1Day tables. The 1Hour and 1Day is used for providing historical metric information in the Grid Console UI pages. The 3 tables that store this data are:

MGMT_METRICS_RAW
MGMT_METRICS_1HOUR
MGMT_METRICS_1DAY

After the data is aggregated, it considered eligible for purging. However, a certain period of time has to pass for data to actually be purged. This period of time is called the Retention time.
The goal of this document is to provide information on how to modify the Grid Control Default Retention and Purging Policies in 10g Grid Control.

Note:

The default aggregation and purging policies have been designed to provide the most available data for analysis while still providing the best performance and disk-space requirements for the Management Repository. As a result, these should not be modified to improve performance or increase the available disk space. Increasing the retention time drastically can affect the performance of the Management Repository and have adverse reactions on the scalability of the Enterprise Manager installation.
Fix

Due to an unpublished bug in Grid Control 10gR2, it was not possible to change the default retention time for the data stored in the Repository of Grid Control.
Refer to
This bug is fixed in 10gR3 (10.2.0.3) and a generic one off patch is available on top of Grid Control 10.2.0.2.0

-  If you want to change the default retention times in Grid Control, you need to upgrade to Grid Control 10.2.0.3 or later. Oracle recommends to always upgrade to the latest Release available.

-  If you want to change the default retention times in 10.2.0.2, you need to apply the following Patch:
Patch 3900473 TRUNCATION OF PARTITIONED TABLES MUST ALLOW OVERRIDE OF RETENTION TIMES

The procedure on how to accomplish this was documented in the 10gR1 Advanced Configuration Guide. This is still valid for 10gR2 and 10gR3, however due to a documentation bug the information was not included in the corresponding documentation.
The steps are the same for all versions and are explained in Oracle� Enterprise Manager Administration 10g Release 5 (10.2.0.5), Chapter 12 - Maintaining and Troubleshooting the Management Repository
Topic: Management Repository Data Retention Policies
Example for Changing Retention Time

The raw data, with the highest insert volume, has the shortest default retention time, which is set to 7 days. As a result, 7 days after it is aggregated into a one-hour record, a raw data point is eligible for purging. One-hour aggregate data records are purged 31 days after they are rolled up to the one-day data table. The highest level of aggregation, one day, is kept for 365 days.
The default data retention policies are summarized in the following table:
Aggregate Level        Retention Time
Raw metric data         7 days
One-hour aggregated metric data         31 days
One-day aggregated metric data         365 days



To modify the default retention time for each level of management data in the repository, you must insert additional rows into the MGMT_PARAMETERS table in the repository database. The Table below shows the parameters that need to be inserted into the MGMT_PARAMETERS table, to modify the retention time for each of the raw data and aggregate data tables.

Table Name        Parameter in MGMT_PARAMETERS Table        Default Retention Value
MGMT_METRICS_RAW         mgmt_raw_keep_window         7 days
MGMT_METRICS_1HOUR         mgmt_hour_keep_window         31 days
MGMT_METRICS_1DAY         mgmt_day_keep_window         365 days


For example, to change the default retention time for the table MGMT_METRICS_RAW from 7 days to 14 days:

1. Use SQL*Plus to connect to the repository database as the SYSMAN user.

2. Check the current value of the MGMT_METRICS_RAW retention value:

SQL> select parameter_name, parameter_value from mgmt_parameters
where parameter_name='mgmt_raw_keep_window';


If there is no row shown, then the value is set to the default value of  7.

3. Enter the following SQL to insert the parameter and change the default value:

SQL> INSERT INTO MGMT_PARAMETERS (PARAMETER_NAME, PARAMETER_VALUE) VALUES ('mgmt_raw_keep_window','14');
SQL> commit;


4. To modify the existing setting, to say 15 days, execute:

SQL> Update MGMT_PARAMETERS set parameter_value=15
     where parameter_name='mgmt_raw_keep_window';
SQL> commit;



Note:
1. The information provided above is an excerpt from the documentation above. Please consult the current documentation for full details.
2. The MGMT_PARAMETERS table does not have entries for the default parameter values. Hence, the first time a modification needs to be done the parameter and its value has to be inserted into this table. For subsequent changes, the existing parameter value can be modified.

For modifying Job History retention time, refer to Note 604978.1:  Grid Control Repository: How to Set the Retention Period or Purge Policy for Enterprise Manager Job History?

回复 只看该作者 道具 举报

4#
发表于 2013-4-22 18:59:08
Aggregate Level        Retention Time
Raw metric data         7 days
One-hour aggregated metric data         31 days
One-day aggregated metric data         365 days

回复 只看该作者 道具 举报

5#
发表于 2013-4-23 13:20:23
今天正好打补丁PSU2,看到个bug fix,如果使用的是 12c的版本可以看下,这个修复了只能看到31天的上限:
Bug 13894390 - Metric Details History Limited to 31 Days [ID 13894390.8]

回复 只看该作者 道具 举报

6#
发表于 2013-4-23 23:34:50
谢谢诸位 ,学习了

回复 只看该作者 道具 举报

您需要登录后才可以回帖 登录 | 注册

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-11-16 15:54 , Processed in 0.049184 second(s), 20 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569