oracle架构说明,Oracle GoldenGate架构概述10--最后一篇,CSN介绍

我们知道在ORACLE数据库中有一个SCN的概念,即System Change Number,简称SCN,简单的说它就是一个Oracle数据库里的时钟。每次数据库状态变化后都会生成一个SCN,比如commit了,就产生一个Commit SCN,当然,这只是Oracle中的其中一种SCN,它还有什么Checkpoint SCN了、Resetlog SCN了、Offline SCN了等等。不管是何种SCN,它记录的是数据库状态的变化,关于SCN的详细讨论,可以参考:http://www.itpub.net/thread-151534-1-1.html,这里就不做详细介绍了。

在Oracle GoldenDate中,为了记录一个个事物,引入了CSN:Commit Sequence Number,注意了是Commit Sequence Number而不是System Change Number,这个是不一样的!!!尽管GG直接引用了Oracle中的SCN来作为GG中的CSN,但是它们还是不一样的!

When working with Oracle GoldenGate, you might need to refer to a Commit Sequence

Number, or CSN. The CSN can be required to position Extract in the transaction log, to

reposition Replicat in the trail, or for other purposes. It is returned by some conversion

functions and is included in reports and certain GGSCI output.

A CSN is an identifierthat Oracle GoldenGate constructs to identify a transaction for the purpose of maintaining transactional consistency and data integrity. It uniquely identifies a particular point in time in which a transaction commits to the database.

Each kind of database management system generates some kind of unique serial number

of its own at the completion of each transaction, which uniquely identifies that transaction.

A CSN captures this same identifying information and represents it internally as a series

of bytes, but the CSN is processed in a platform-independent manner. A comparison of any

two CSN numbers, each of which is bound to a transaction-commit record in the same log

stream, reliably indicates the order in which the two transactions completed.

The CSN value is stored as a token in any trail record that identifies the beginning of a

transaction. This value can be retrieved with the @GETENV column conversion function and

viewed with the Logdump utility.

Extract writes a normalized form of the CSN to external storage such as the trail files and

the checkpoint file. There, the CSN is represented as a hex string of bytes. In normalized

form, the first two bytes represent the database platform, and the remainder of the string

represents the actual unique identifier.

这段文字翻译起来挺别扭的,直接般过来算了:)

阅读(1721) | 评论(0) | 转发(0) |

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值