V$SYSMETRIC_HISTORY 的時間錯亂.
起初用了下
select end_time,
value
from sys.v_$sysmetric_history
where metric_name = 'Database CPU Time Ratio'
order by 1;
想檢視下CPU時間比率,卻發現
END_TIME VALUE
-------------------- ----------
2011-11-09 23:31:28 92.4533213
2011-11-09 23:32:28 76.3461827
這邊的時間都是錯誤的..跑到2011年11月09日去了.
随即查了下這個v_$sysmetric_history的定義.
SYS@PPTD(7.15)> select * from v$fixed_view_definition where view_name like '%V$SYSMETRIC_HISTORY%';
VIEW_NAME
------------------------------
VIEW_DEFINITION
--------------------------------------------------------------------------------------------------------------------------------------------
GV$SYSMETRIC_HISTORY
SELECT inst_id, begtime, endtime, intsize_csec,groupid, metricid, name, value, unit FROM x$kewmdrmv WHERE groupid in (2,3)
用的是X表,x$kewmdrmv
這下不知道如何解決是好..
大夥有碰到類似這樣的狀況嗎?
難道,Oracle運作了一段時間以後X表的統計值 會有錯亂的情況??
有無方法重置?修複?
sundog315的答複
Bug 5880921 - Time inconsistency between V$SYSMETRIC_HISTORY and SYSDATE [ID 5880921.8]
--------------------------------------------------------------------------------
修改時間 03-APR-2009 類型 PATCH 狀态 PUBLISHED
Bug 5880921 Time inconsistency between V$SYSMETRIC_HISTORY and SYSDATE
This note gives a brief overview of bug 5880921.
The content was last updated on: 03-APR-2009
Click here for details of each of the sections below.
Affects:
Product (Component) Oracle Server (Rdbms)
Range of versions believed to be affected (Not specified)
Versions confirmed as being affected •10.2.0.3
•10.2.0.4
Platforms affected Generic (all / most platforms affected)
Fixed:
This issue is fixed in •10.2.0.2 Patch 18 on Windows Platforms
•10.2.0.3 Patch 10 on Windows Platforms
•10.2.0.3 Patch 18 on Windows Platforms
•10.2.0.4 Patch 2 on Windows Platforms
•10.2.0.5 (Server Patch Set)
•11.1.0.7 (Server Patch Set)
Symptoms: Related To:
•Wrong Results
•Performance Monitoring
•V$SYSMETRIC_HISTORY
Description
V$SYSMETRIC_HISTORY may show incorrect timestamps
Note: This bug was previously incorrectly listed as fixed in 10.2.0.4
Please note: The above is a summary description only. Actual symptoms can vary. Matching to any symptoms here does not confirm that you are encountering this problem. Always consult with Oracle Support for advice.
References
Bug:5880921 (This link will only work for PUBLISHED bugs)
Note:245840.1 Information on the sections in this article
--------------------------------------------------------------------------------
看來隻能通過打更新檔解決了,或是restart DB(這個很不現實...)