This content has been marked as final. Show 3 replies
An Oracle database uses its own independent system for time integrity, which is not based on the system time and is called SCN (System Change Number). You don't need to shutdown the database to change the OS time. To synchronize the system clock of your database server with the rest of the organization you need to find out what services exist. A common way to synchronize the time over a TCP/IP network is to use NTP.
missymichi wrote:What Dude says is true but may be a bit confusing. Perhaps I can clarify -- and perhaps not ;-)
I receive an email about timestamps which says that our main server is advanced by 10 minutes. My boss is asking me to synchronize the time of Oracle to the time we use on our workplace. I tried to Google several choices regarding this issue but I end up finding those that point to fixed dates. Is there anyway I can change the time without having to shut down the database?
Oracle gets its time from the OS, pure and simple. Change the os time, and that will be reflected in oracle whenever it needs a time (like a SELECT SYSDATE FROM DUAL;). Oracle does not keep its own clock, but relies on that of the OS.
However, oracle keeps the chronological sequence of key events - start of a transaction, rollback, commit, etc) not by time but by SCN. So let's say a transaction begins. It is assigned an SCN of say, 1. Then another transaction begins and is assigned an SCN of 2. Then someone sets the os clock back by one hour. Then another transaction starts and is assigned the next SCN of 3. In a recovery scenario, those transactions will be replayed in the sequence of their SCN. It won't matter that the clock time of SCN 3 was one hour earlier than that of SCN 1 and 2.