Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
General
cancel
Showing results for 
Search instead for 
Did you mean: 

Different TimeZone through listener.ora on HPUX

Eitan_4
Occasional Contributor

Different TimeZone through listener.ora on HPUX

Hi All

If the query is run through SQL*Net, Oracle will return the time zone based on the setting of the UNIX environment variable "TZ" for the user who started the listener.
-- Queries run through SQL*Plus (who uses the listener.ora)
If the query is run through SQL*Plus, Oracle will return the time zone based on the setting of the UNIX environment variable "TZ" minus 6 hours !!!
The problem is solvable to restart the listerner. Only the strang thing is that the first one who connect to the database has the right server time. But alle the users which connect later have the wrong time????

I have HPUX11i oracle 9.2.0

Thanks
5 REPLIES
Steven E. Protter
Exalted Contributor

Re: Different TimeZone through listener.ora on HPUX

I wonder. Are all users in the same time zone? I can see users from different timezones having problems due to local environment variables.

The first thing I would check here is the TZ and other relavent environment variables for allusers involved. A startup script could be trying to set an environment variable incorrectly as well.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Eitan_4
Occasional Contributor

Re: Different TimeZone through listener.ora on HPUX

HI

All users are in the same time zone .

But probbly the TZ dont past to the Listener for some resone .
Yogeeraj_1
Honored Contributor

Re: Different TimeZone through listener.ora on HPUX

hi,

Please note that:
The TZ environment variable is picked up by the dedicated or shared server. These inherit their environment from whomever starts them.

So, as long as
a) the listener has tz set
b) the person who starts the database has tz set
c) everyone connects via the listener

you'll be OK. direct connections (no listener) will fork and exec their own dedicated servers -- so they will get the TZ of the client.

hope this helps!

regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Eitan_4
Occasional Contributor

Re: Different TimeZone through listener.ora on HPUX

I found a bypass to the problem .

because the listener dosn't get the TZ from the user I added the file /etc/defult/tz whit my timezone and it's work properly .
this is bypass solved the problem .

but still I have to change it when the clock is changing .

Thanks
Eitan_4
Occasional Contributor

Re: Different TimeZone through listener.ora on HPUX

I found a bypass to the problem .

because the listener dosn't get the TZ from the user I added the file /etc/defult/tz whit my timezone and it's work properly .
this is bypass solved the problem .

but still I have to change it when the clock is changing .

Thanks