In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how to check scn headroom for oracle. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
11.2.0.2 and then the maximum growth rate of scn per second is 32k, which is controlled by the implicit parameter _ max_reasonable_scn_rate. Before 11.2.0.2, the maximum scn growth rate per second was 16k, so it should be calculated separately. The calculated "headroom" value means that it will grow at the maximum rate per second and will reach the maximum value after how many days.
Now the calculation methods circulated on the Internet are calculated according to the previous maximum growth of 16k per second, so the calculated results have errors, although the error is not very large, but oracle still needs to pay attention to the accuracy. Use the sql below to check that the results are accurate.
SELECT VERSION
TO_CHAR (CURRENT_SCN)
DATE_TIME
TO_CHAR (ROUND (HEADROOM, 2))
FROM (SELECT VERSION
DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER CURRENT_SCN
TO_CHAR (SYSDATE, 'YYYY-MM-DD HH24:MI:SS') DATE_TIME
Case
When replace (version,'.') < 112020 then
(TO_NUMBER (TO_CHAR (SYSDATE, 'YYYY'))-1988) * 12 * 31 * 24 * 60 * 60) +
((TO_NUMBER (TO_CHAR (SYSDATE, 'MM'))-1) * 31 * 24 * 60 * 60) +
((TO_NUMBER (TO_CHAR (SYSDATE, 'DD'))-1)) * 24 * 60 * 60) +
(TO_NUMBER (TO_CHAR (SYSDATE, 'HH24')) * 60 * 60) +
(TO_NUMBER (TO_CHAR (SYSDATE, 'MI')) * 60) +
(TO_NUMBER (TO_CHAR (SYSDATE, 'SS') * (16 * 1024))-
DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER) /
(16 * 1024 * 60 * 60 * 24)
Else
(TO_NUMBER (TO_CHAR (SYSDATE, 'YYYY'))-1988) * 12 * 31 * 24 * 60 * 60) +
((TO_NUMBER (TO_CHAR (SYSDATE, 'MM'))-1) * 31 * 24 * 60 * 60) +
((TO_NUMBER (TO_CHAR (SYSDATE, 'DD'))-1)) * 24 * 60 * 60) +
(TO_NUMBER (TO_CHAR (SYSDATE, 'HH24')) * 60 * 60) +
(TO_NUMBER (TO_CHAR (SYSDATE, 'MI')) * 60) +
(TO_NUMBER (TO_CHAR (SYSDATE, 'SS') * (32 * 1024))-
DBMS_FLASHBACK.GET_SYSTEM_CHANGE_NUMBER) /
(32 * 1024 * 60 * 24))
End HEADROOM
FROM V$INSTANCE)
This is the end of the article on "how to check scn headroom for oracle". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.