Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

Time Synch on Oracle

Go to solution
paul courry
Honored Contributor

Time Synch on Oracle

I need enlightenment.....

I have been informed that my plan to synchonize a bunch of boxes using NTP may run afoul of Oracle.

Specifically, that Oracle has an internal timeclock independent of the system clock.

If this is true I need to know how to bring Oracle into my synch plans. If not, then we need to have a good laugh at my expense.
James R. Ferguson
Acclaimed Contributor

Re: Time Synch on Oracle

Hi Paul:

The only way to run amuck (as far as I know) is to start running xntpd when your Oracle server's time is ahead of the source to which you are going to synchronize. In that case, xntpd will step the clock *backwards* which is not kind to database journaling should a recovery/rollback be necessary.

You can circumvent these problems by stopping your database and stepping the clock or by slewing the clock gently with 'date -a' [see the man pages] or specifying a "slew" with the '-x' option to the 'xntpd' daemon.


Pete Randall
Outstanding Contributor

Re: Time Synch on Oracle


I find that very hard to believe - how would Oracle, which is just a software program, keep track of time when it (Oracle) is not running?

I'll be following this thread with interest.


T G Manikandan
Honored Contributor

Re: Time Synch on Oracle

To my knowledge
Oracle uses the system clock.

sync system clock should be fine.

Christian Gebhardt
Honored Contributor

Re: Time Synch on Oracle

Oracle has no own internal timeclock (as I know).
Oracle uses SCN's (system change numbers) to synchronize the internal jobs.
We uses ntp for a long time on oracle-servers and had no problems

John Palmer
Honored Contributor

Re: Time Synch on Oracle


Presuming your servers are HP-UX 11.x then why don't you use 'date -a' to drift the system clock to (almost) the correct time before you implement synchronisation. This will mean that your clock will never be adjusted by any large amount of time.

Oracle does use the system clock for generating date/time fields etc.

Alwyn Santos

Re: Time Synch on Oracle

The only time "that I can think of" the system clock would effect oracle is if you were doing a point in time recovery and needed to go the time after the clock was switched back.

i.e. the system had a time of 10:30pm, it was readjusted to 10:15pm, you needed to recover to 10:25pm. The question would be "which 10:25pm?". All is not lost yet, you could identify the appropiate scn number and recover to that point, if needed.
John Poff
Honored Contributor

Re: Time Synch on Oracle

Hi Pete,

We've had all our Unix boxes running ntp for a long time, with lots of Oracle instances all over the place, and we've never had a problem with the time syncs and Oracle. My understanding is that the ntp machinery will adjust the time gradually as needed. If your time is very far off, you'll need to do what others have mentioned and stop the databases while you set the correct time. Otherwise, I'd say setup ntp and don't worry about it.

Robert-Jan Goossens
Honored Contributor

Re: Time Synch on Oracle

Hi Paul,

Here's your as requested in your other question about ntp setup in W2000.

Kind regards,

Jim Turner
Esteemed Contributor

Re: Time Synch on Oracle

Hey Paul,

One other idea: Slip ntpdate into an rc script that preceeds the startup of ntpd and Oracle. That way at boot time, any large corrections will be made straightaway. From that point on, ntpd can keep things in check. That's what we do in our shop.


Was this information helpful? If so, please like and give kudos. Thanks!
Leon Allen
Regular Advisor

Re: Time Synch on Oracle

What little I know on the subject is this:

Setting time forward is no drama whatsoever: Oracle just see it as a period of no activity.

setting time backwards is a little bit trickerer, but usually OK as Oracle does not primarily use the system clock, but its own SCN's (system change numbers) to order a nd sequence things.

I've just synced a couple of servers using NTP with no drama.
Time's fun when your having flys (ancient frog saying)
Alexander M. Ermes
Honored Contributor

Re: Time Synch on Oracle

Hi Paul.
The idea with the system clock is correct.
We have some Oracle Applcations running.
The timestamps are exactly from the system clock, no matter if Unix, Linux or MS Win. So try to find a time server and sync your database servers to this one.
Hope you are allright after your trip
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Honored Contributor

Re: Time Synch on Oracle


Oracle gets the time from
the OS. It does not have its own clock for telling wall clock time!

Also, the database server uses an internal clock called the SCN (system change number). It does not rely on the system wall clock.

No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)