Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

could not get the database date 1

Status
Not open for further replies.

rk0000

Technical User
Mar 15, 2002
33
IN
hi
We have oracle 8.1.6 installed on IBM AIX machine.
At command prompt
$date
Tue Aug 27 03:04:03 PDT 2002
$sqlplus login/passwd
SQL> select sysdate from dual;
SYSDATE
--------------------
27-AUG-2002 03:04:15

IT is same the OS date. Note here that i have not given the connect string. Now i exit from sql
again from prompt
$sqlplus login/passwd@db_name
SQL> select sysdate from dual;
SYSDATE
--------------------
27-AUG-2002 10:04:38
This is GMT time. (Our DB is set to GMT). Why this difference comming when i give the connect string. I want date should be always be the date of DB. What should i do?
Thank u
Rama
 
Good question! I found some info:

=====================================================
source: rajeev nadimpalli

When you run a query on Unix such as "select sysdate from dual" it will return the system current date and time, which is the same as the OS current date and time. When "select sysdate from dual" is run through SQL*Net, Oracle will use the time zone based on the setting of the UNIX environment variable "TZ" for the user who started the listener.

=====================================================

I would check the TX setting for the account you started ORACLE and the listener with, against the timezone of the server. Perhaps you can align them to get what you want.


Thomas V. Flaherty Jr.
Birch Hill Technology Group, Inc.
 
what u said is right . The problem is solved.
Thank u Thomas .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top