Operating System - HP-UX
1829590 Members
6589 Online
109992 Solutions
New Discussion

Re: To sync time or not in an Oracle environment

 
joe Kowalczyk
Occasional Contributor

To sync time or not in an Oracle environment

I want to synchronize my time, but my Oracle manager is concerned about the effects synchronization will have on the database transactions. Any comments pro or con??
5 REPLIES 5
James R. Ferguson
Acclaimed Contributor

Re: To sync time or not in an Oracle environment

Hi Joe:

I absolutely want (and have) all of my servers running synchronized time.

Stepping time forward is much less of a problem (if any, to a database) than moving it backwards.

Your local server time will not be sychronized with a time source if it differs by more than 1000 seconds. The 'xntpd' daemon will simply, eventually die.

With 11.x, you can use the 'date' command to slew time gently:

# date [-a [-]sss[.fff]]

The best choice, however, is to implement NTP. A simple guide to setting up Network Time Protocol (NTP) is found in the "Installing and Administering Internet Services" manual:

http://docs.hp.com/hpux/onlinedocs/B2355-90685/B2355-90685.html

For a good list of available time sources, see:

http://www.eecis.udel.edu/~mills/ntp/clock1.htm

If you wish to merely synchronize locally take a look at Knowledge Base document #A5864817. You can use one of your servers as a "master" clock for the remaining ones without going outside of your local network.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: To sync time or not in an Oracle environment

Your Oracle guy should be concerned that you are not running NTP. His concern is that somehow adjusting the time makes abrupt changes so that backwards adjustments could leave your data in a state where transaction 999 could have a later timestamp than transaction 1000!! Fortunately, it ain't so because (unless you explicitly override the default behavior and use ntpdate) the adjustments are made by slewing rather than stepping the time. Slewing means that the 'clock ticks' run fast or slow as needed until the times are synchronized. NTP can easily maintain time to within a few 10's of milliseconds across your network.

I suggest that you sync your main time server to an Internet Time Source (such as the U. S. Naval Observatory - unless you have an on-site GPS time source) and then sync your other time servers and clients to this main server.

You can easily set all this up simply using SAM.


If it ain't broke, I can fix that.
John Strang
Regular Advisor

Re: To sync time or not in an Oracle environment

The only effect will be positive! He should welcome the fact that by running ntp you will effectively eliminate any possibility of transactions being posted out of sequence.

John
If you never make a mistake you'll never make anything.
George A Bodnar
Trusted Contributor

Re: To sync time or not in an Oracle environment

Use NTP as suggested above as it does not make abrupt time changes and never goes back in time, rather just slows/speeds up to match its target time.

One thing to consider is most Oracle applications are linked with other systems so NOT having very similar time on each system can be much worse when trying to track transaction flow - especially if you have time differences in the range of minutes instead of seconds.
Sorrel G. Jakins
Valued Contributor

Re: To sync time or not in an Oracle environment

Get a new Oracle Manager. Problem solved.