Oracle RAC – Where Does SYSTIMESTAMP Come From in Multi-Server Environment?

oracleoracle-racsequencetimestamp

Where does SYSTIMESTAMP come from in multi-server Oracle RAC environment?

I'm hoping that the SYSTIMESTAMP derives from a common location (master node?) as opposed to the server that is currently servicing the request.

Additional Detail:

We are using a timestamp to ensure that entries in a log table are recorded sequentially. Say, for example, we have two nodes in our RAC and they are 1 second off. Our app server inserts two log entries within, say, 0.03 seconds of each other. The first insert is serviced by Node1 and the second by Node2. If there is one second difference between the two nodes, the timestamp could potentially show the log entries occurring in the wrong order! (I would just use a sequence, but our sequences are cached for performance reasons… )

Best Answer

Up to 11g I know Oracle used the local OS time as the system time in a RAC environment, and I never heard that it changed so I'm comfortable saying it's still in place.

You would sync all the servers together typically using NTP or another solution to ensure the time sync. Usually if your servers local time is out of sync even by 30 seconds or so, you will tend to see other issues such as Kerberos auth issues so it's unlikely they are far off from each other.