参考文档:

Master Note: Overview for SCN issues (文档 ID 1503937.1)

System Change Number (SCN), Headroom, Security and Patch Information (文档 ID 1376995.1)

What is System Change Number (SCN)?

The system change number (SCN) is a database ordering primitive. The value of an SCN is the logical point in time at which changes are made to a database. The database uses these SCNs to query and track the changes. For example, if a transaction updates a row, then the database records the SCN at which this update occurred.

There is a very large upper limit to how many SCNs an Oracle Database can use. That limit is currently 281 trillion, or specifically 281,474,976,710,656 (is 2^48) where the Oracle Database should not run out of available ones.

What is SCN Headroom?

The difference between the current SCN the database is using, and the "not to exceed" upper limit, is known as the SCN headroom. For almost all Oracle Databases, this headroom is constantly increasing every second. However, Oracle has determined that some software bugs could cause the database to attempt to exceed the current maximum SCN value (or get closer to the limit than was warranted). Generally if the database does try to exceed the current maximum SCN value, the transaction that caused this event would be cancelled by the database, and the application would see an error. The next second the limit increases, so typically the application then continues with a slight hiccough in processing. However, in some very rare cases, the database does need to shutdown to preserve its integrity. In no cases is data lost or corrupted.

--------------------------

The system change number (SCN) is a logical, internal timestamp used by the Oracle Database. SCNs order events that occur within the database, which is necessary to satisfy the ACID properties of a transaction.

The database uses SCNs to query and track changes. For example, if a transaction updates a row, then the database records the SCN at which this update occurred. Other modifications in this transaction typically have the same SCN. When a transaction commits, the database records an SCN for this commit. Each transaction increments the SCN after commits.

SCNs occur in a monotonically increasing sequence, and there is a very large upper limit to how many SCNs an Oracle Database can use. Starting 12.2.0.1 with compatibility set to 12.2 the limit is 2^63 and for versions below 12.2.0.1 it is 2^48 or 281 trillion SCN values.

Given that there is an upper limit, it is important that any given Oracle Database does not run out of available SCNs. The Oracle Database uses a time based rationing system to ensure that this does not happen.

At any point in time, the Oracle Database calculates a "not to exceed" limit for the number of SCNs a database can have used, based on the number of seconds elapsed since 1988, multiplied by 16,384 (16K/sec). This is known as the database's current maximum SCN limit. Doing this ensures that Oracle Databases will ration SCNs over time, allowing over 500 years of data processing for any Oracle Database using version 12.2.0.1 or lower. Starting 12.2.0.1 with compatibility set to 12.2, even if the SCNs are consumed at the rate of 96K/sec, the Oracle Database will allow close to 3 million years of data processing.

The difference between the current SCN the database is using, and the "not to exceed" upper limit, is known as the SCN headroom. For almost all Oracle Databases, this headroom is constantly increasing every second.

However, Oracle has determined that some software bugs could cause the database to attempt to exceed the current maximum SCN value (or get closer to the limit than was warranted).

Generally if the database does try to exceed the current maximum SCN value, the transaction that caused this event would be cancelled by the database, and the application would see an error. The next second the limit increases, so typically the application then continues with a slight hiccough in processing. However, in some very rare cases, the database does need to shut down to preserve its integrity. In no cases is data lost or corrupted.

Similar to how clocks are kept synchronized in a computer network, when two databases communicate with each other over a database link, they synchronize their SCNs by picking the largest SCN in use by the two. So in some cases, databases experienced rapidly decreasing SCN headroom not because of a bug in that specific database, but because the bug was active in one or more of the databases that database was connected to. Since the database always rejects SCNs that exceed the current maximum SCN, the provision of being able to run Oracle Databases for more than 500 years was not affected in any of the cases.

All the associated bugs have been fixed in the January 2012 CPU (and associated PSU). The same fixes are also available in the database Patchset Update (PSU) and the latest Oracle Exadata and Windows bundled patches.

Some customers expressed concerns that they may be getting closer to the current maximum SCN limit faster than the data processing they are doing would warrant. In all cases Oracle has found this to be a factor of one of the bugs fixed in the January 2012 CPU - and customers that have applied the fixes find that their SCN headroom starts to increase again, as it should.

To make sure they are not seeing these potential issues in their systems, customers can run a script that checks how far any particular database is away from the current maximum SCN limit for that database. The script is available in Document:1393363.1. The script will alert customers that they may be close to the maximum SCN limit, in which case Oracle recommends they should apply the CPU to the affected database (and interconnected databases) without delay. The expectation is then that these databases will start to grow their available SCN headroom, and for the affected customers that have applied the CPU, this has indeed been the case. The vast majority of customers will find their databases are not even close to the maximum SCN limit, in which case they can apply the CPU (or associated PSU) as part of their normal patching procedures. As always, Oracle recommends that CPUs be applied as soon as possible to address any additional security issues fixed in the CPU.

---------------- 谷歌翻译

scn headroom
数据库使用的当前SCN与“不超过”上限之间的差异称为SCN余量。

在任何时候,Oracle数据库都会计算数据库可以使用的SCN数量的“不超过”限制,根据自1988年以来的秒数,再乘以16,384(16K /秒)。这称为数据库当前的最大SCN限制。这样做可确保Oracle数据库随着时间推移对SCN进行排序,允许使用12.2.0.1或更低版本的任何Oracle数据库进行500多年的数据处理。在兼容性设置为12.2的情况下启动12.2.0.1,即使SCN以96K /秒的速率消耗,Oracle数据库也将允许接近300万年的数据处理。
数据库使用的当前SCN与“不超过”上限之间的差异称为SCN余量。对于几乎所有Oracle数据库而言,这个空间每秒都在不断增加。
但是,Oracle已确定某些软件错误可能导致数据库尝试超过当前的最大SCN值。
通常,如果数据库确实尝试超过当前最大SCN值,则导致此事件的事务将被数据库取消,并且应用程序将看到错误。下一秒限制增加,因此通常应用程序继续处理中的轻微打嗝。但是,在一些非常罕见的情况下,数据库确实需要关闭以保持其完整性。在任何情况下都不会丢失或损坏数据。
类似于计算机网络中时钟保持同步的方式,当两个数据库通过数据库链路相互通信时,它们通过选择两个使用的最大SCN来同步其SCN。
因此,在某些情况下,数据库经历了SCN扩展空间的快速减少,这不是因为该特定数据库中的错误,而是因为该错误在数据库连接到的一个或多个数据库中是活动的。由于数据库总是拒绝超过当前最大SCN的SCN,因此在任何情况下都不会影响能够运行Oracle数据库500多年的规定。
一些客户表示担心他们可能会比他们正在进行的数据处理更快地接近当前的最大SCN限制。在所有情况下,Oracle都发现这是2012年1月CPU中修复的错误之一 - 已经应用修复程序的客户发现他们的SCN空间开始再次增加,应该如此。

为了确保他们没有在系统中看到这些潜在问题,客户可以运行一个脚本来检查任何特定数据库距离该数据库的当前最大SCN限制的距离。该脚本可在文档:1393363.1中找到。该脚本将提醒客户他们可能接近最大SCN限制,在这种情况下,Oracle建议他们应该毫不拖延地将CPU应用于受影响的数据库(以及互连的数据库)。因此,期望这些数据库将开始增加其可用的SCN余量,对于已应用CPU的受影响客户,情况确实如此。绝大多数客户会发现他们的数据库甚至没有接近最大SCN限制,在这种情况下,他们可以将CPU(或相关的PSU)作为其正常修补程序的一部分。与往常一样,Oracle建议尽快应用CPU以解决CPU中修复的任何其他安全问题。

----

从上面的文章中,scn的最大值。

2的48次方 -- 版本低于12.2.0.1
2的63次方 --版本从12.0.1 ,兼容性设置为12.2

END

scn,headroom相关推荐

  1. SCN Headroom与时光倒流到1988年的Oracle数据库

    最近一阵关于scn headroom的讨论很热,  这是由于在最新的2012 Apr的PSU中例如10.2.0.5上的PSU 13632743和 patch  13916709: SCN: HIGH ...

  2. SCN Headroom过低问题处理

    转载于https://www.cnblogs.com/dc-chen/p/7245290.html 一. 基础概念 1.SCN(System Change Number)值是Oracle数据库运行每次 ...

  3. SCN Headroom

    为什么要检查SCN Headroom Oracle对于SCN的增长有个小小的限制,即当前HeadRoom,注意,用了 当前 两个字,表示这个HeadRoom是实时计算出来的,计算方式为:1988年距当 ...

  4. 翻译mos文章 scn headroom ID 1376995.1

    System Change Number (SCN), Headroom, Security and PatchInformation                                 ...

  5. oracle11g数据库版本号,Oracle数据库之关于oracle db 11gR2版本号上的參数和scn headroom补丁问题...

    本文主要向大家介绍了Oracle数据库之关于oracle db 11gR2版本号上的參数和scn headroom补丁问题,通过具体的内容向大家展现,希望对大家学习Oracle数据库有所帮助. 关于o ...

  6. SCN headroom问题解决方案

    转载请注明出处,谢谢! ---好久没来逛ITPUB了,发一篇大家关心的问题 1.   SCN headroom简介 SCN是Oracle内部使用的逻辑时钟,用于区分事务操作的先后次序以及确保事务操作的 ...

  7. SCN HeadRoom 事件分析

    SCN的可能最大值与耗尽问题     在2012年第一季度的CPU补丁中,包含了一个关于SCN修正的重要变更,这个补丁提示,在异常情况下,Oracle的SCN可能出现异常增长,使得数据库的一切事务停止 ...

  8. oracle最新scn补丁,Oracle 系统改变号(SCN), Headroom, 安全和补丁信息

    适用于: Oracle Database – Enterprise Edition – 版本 10.1.0.5到 11.2.0.3 [Release 10.1 to 11.2] 本文信息适用于任何平台 ...

  9. oracle检查scn headroom的正确方法

    11.2.0.2及之后的scn每秒最大增长速率是32k,由隐含参数_max_reasonable_scn_rate控制.11.2.0.2之前每秒最大的scn增长速度是16k,所以要分开计算.计算出的& ...

最新文章

  1. 动手写一个快速集成网易新闻,腾讯视频,头条首页的ScrollPageView,显示滚动视图...
  2. 前端:background背景图
  3. 游戏行业应该如何建设数据中台?
  4. linux: kill -9
  5. 如何选择适合的数据分析软件
  6. Linux中与驱动相关的ioctl函数
  7. LVS_Cluster
  8. 图易服装PDM产品数据管理系统
  9. 中国互联网发展报告(2021)
  10. 【CSS基础】box-shadow盒子阴影(重点)
  11. 手机qq如何绑定qq邮箱服务器,iphone怎么绑定qq邮箱
  12. 键盘输入一个高精度的正整数N,去掉其中任意S个数字后剩下的数字按原左右次序将组成一个新的正整数。编程对给定的N和S,寻找一种方案使得剩下的数字组成的新数最小。(C++)(贪心法)
  13. AI 图像识别的测试
  14. 直线检测算法博文中缺失的几个源码(Hough_line、LSD、FLD、EDlines、LSWMS、CannyLines、MCMLSD、LSM)
  15. C#实现带盐值加密,适配JAVA Shiro加密
  16. 运城学院计算机课,主讲教师
  17. 【考研复试】计算机相关专业面试英语自我介绍范文(一)
  18. Python 翻译 Post请求
  19. 图解 Python 编程(1) | 介绍(附要点速查表·完结)
  20. GETTING-STARTED

热门文章

  1. 阿德勒(个体心理学)埃里克森(自我心理学)
  2. 计算机机房方面的职业资格证,【国家标准】国家职业技能标准 (2019年版) 水文勘测工(33页)-原创力文档...
  3. 如何拒绝公司耍无赖?(2)
  4. 常用IDE快捷键整理
  5. chrome 打开默认页 被篡改_为什么 Chrome 浏览器的主页会被篡改为 hao123 ?遇到这种情况要如何修复?...
  6. Python使用Moviepy将图像序列转换为视频
  7. 【Linux】/lib64/libstdc++.so.6: version `CXXABI_1.3.9‘ not found
  8. r语言summary函数使用_R语言--操纵数据--重要函数的使用
  9. c语言指针与函数ppt,函数与指针C语言.ppt
  10. 雾计算与边缘计算的区别