Skip to main content

Posts

Showing posts from March, 2012

Timestamp - Drift in Oracle RAC

To track the data changes in Oracle database, I’m planning to use Timestamp based approach. During implementation Rajesh has taken my attention to an interesting case, Where I have 2 Nodes in Oracle RAC, these 2 node can return different  timestamp even if you fire the concurrent requests. This difference can be up to 2mins as Timestamp is dependent on machine clock cycle. Oracle RAC keeps timestamp in Sync with the help of NTP (Network Time Protocol), which triggers after every 15mins ( http://www.oracledatabase12g.com/wp-content/uploads/html/RAC-Frequently%20Asked%20Questions.htm#A10074 ) Solution to this problem could be :          1.    Use of System Change Number (SCN) : A sequence number allocated by oracle to keep track of the changes. Oracle keep all the nodes and data changes in sync by allocating unique SCN number and uses this for backup and restore purpose.  SCN gets allocated at Block level on Commit operation by default. To change this behaviour and to keep track of r