Re: GMT date while server is EST - working almost ...

  • From: Mark Brinsmead <mark.brinsmead@xxxxxxx>
  • To: Mark.Bobak@xxxxxxxxxxxxxxx
  • Date: Wed, 11 Jan 2006 23:19:25 -0700

Not (absolutely) certain, but you should be able to get around this by setting (and exporting) the TZ variable in your
environment before starting the instance that runs in GMT.


For example:

------------------------------
#!/bin/sh

# Start GMT_SID on Greenwich Mean Time
TZ=GMT; export TZ
ORACLE_SID=GMT_SID
sqlplus /nolog << EOF
  connect / as sysdba
  startup
EOF

# Start LOCALSID on local (HP-UX) timezone
unset TZ
ORACLE_SID=LOCALSID
sqlplus /nolog << EOF
  connect / as sysdba
  startup
EOF
----------------------------

You could probably use the same trick for starting listeners, too. 'Course, I'm just guessing on both counts...

Cheers,
-- Mark.


Bobak, Mark wrote:

Database version? Platform? etc....
I think the way it works is, you define in the listener's environment, and since the listener starts the Oracle server process when you connect via listener, it sees the modified environment, and that's how the correct time is set. However, server processes for jobs are not spawned by the listener. Also, if you do a connect w/o the listener, login to database server, set ORACLE_SID and then connect with: sqlplus user/password I'll bet that doesn't see the modified timezone either.
So, I guess I've explained why (I think) it doesn't work.....but I don't have a solution for you...sorry.
-Mark


*--*
*Mark J. Bobak*
*Senior Oracle Architect*
*ProQuest Information & Learning*

"There are 10 types of people in the world: Those who understand binary, and those who don't."



------------------------------------------------------------------------
*From:* oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] *On Behalf Of *Fedock, John (KAM.RHQ)
*Sent:* Wednesday, January 11, 2006 5:05 PM
*To:* oracle-l@xxxxxxxxxxxxx
*Subject:* GMT date while server is EST - working almost ...


My HP-UX server is set at EST time. There are several databases running there. I want one (9.2.x) to run at GMT time. I followed the notes on MetaLink, created a new listener, set the TZ variable, etc, and now SYSDATE does resolve out to GMT time. However, internal database time (like jobs running in DBA_JOBS), are still at EST. I was hoping these would run at GMT time as well.

Is this the way it should be? I was hoping that the changes I list above would negate this. Any advice?

Thanks.



John Fedock
*K* Line America, Inc.
john.fedock 'at' us.kline.com


Other related posts: