1752553 Members
4529 Online
108788 Solutions
New Discussion юеВ

Time Synch on Oracle

 
SOLVED
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.
12 REPLIES 12
James R. Ferguson
Acclaimed Contributor
Solution

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.

Regards!

...JRF...
Pete Randall
Outstanding Contributor

Re: Time Synch on Oracle

Paul,

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.

Pete

Pete
T G Manikandan
Honored Contributor

Re: Time Synch on Oracle

To my knowledge
Oracle uses the system clock.

sync system clock should be fine.

Thanks
Christian Gebhardt
Honored Contributor

Re: Time Synch on Oracle

Hi
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

Chris
John Palmer
Honored Contributor

Re: Time Synch on Oracle

Hi,

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.

Regards,
John
Alwyn Santos
Advisor

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.

JP
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,

Robert-jan.
Jim Turner
HPE Pro

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.

Cheers,
Jim