How can I sync my system time with that of a database?

2

I need my laptops timestamp to be the same as that of a database, is there a utility I can use for this?

So far, I'm having to run select systimestamp from dual; on my database, working out the difference in time against my clock, and adjusting it manually.

Its quite awkward, and goes out of sync often. I also need to be precise (within 5 seconds) and its a nuisance..

user155695

Posted 2010-09-29T10:31:55.110

Reputation: 2 819

Might this be better suited to SO? If so can a mod please migrate? thanks – user155695 – 2010-09-29T10:37:58.457

Is the DB server in the same LAN like your laptops? Do you have administrative access to the server where your database is running on? – Martin – 2010-09-29T10:43:29.387

On same network yes, but I don't have access to server where DB is located, just SQLPlus connection. Thinking if a batch script could do this for me.. – user155695 – 2010-09-29T11:06:47.297

Answers

4

I think you have at least two options:

  1. Ask the database admin to install a NTP (Network Time Protocol) server on the machine. You should then be able to retrieve the time from the DB servers with your laptops (instead of synching with a time server over the internet).
  2. Ask the database admin if it is possible to synch the server with an internet-hosted time server. You then need to synch the notebooks' time with that same time server to get the laptops into synch with the database server.

Martin

Posted 2010-09-29T10:31:55.110

Reputation: 3 619