Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to get time from Oracle?

Re: How to get time from Oracle?

From: David J. Rubin <djrubin_at_data-futures.com>
Date: 1998/02/19
Message-ID: <34EC9F2F.FEED08BE@data-futures.com>#1/1

Hi Jimmy,

You may have made a mistake that happens to many users... typing MM for the minutes field by accident instead of MI. This would explain the 02:02:02. Oracle gets its time from the OS on startup of the database. To change the time in Oracle, change the time on the server, but be careful! There are many timestamps saved throughout the database and if you backup the time before the last timestamps you could get into trouble. Before changing the time, record what the current bad time is... change the time in Unix and wait until the bad time has passed.

Hope this helps!

David J. Rubin
Data Futures, Inc.

Jimmy wrote:

> Hello all,
>
> I want to get system time from the Oracle. I use "select
> to_char(sysdate, 'HH:MM:SS') from dual" in the SQL*PLUS. The first
> result was "02:02:50". Later, I typed the above command again and the
> result was "02:02:55". However, when I typed the command a few second
> later, the result was "02:02:02". Why the system time seems running in
> cycle? Also, is the sysdate function get time from the UNIX OS? (Oracle
> is running on UNIX) If I want to change the system time in Oracle, how
> can I do that?
>
> THanks,
> Jimmy
Received on Thu Feb 19 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US