Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Where the value of systimestamp/sysdate comes from and dbms_scheduler

I saw bunch of other posts but I could find the post that exactly explaining about where the value returned as systimestamp/sysdate comes from or impacted or I’m missing something and need some help.
Here is my situation
I have an access to this db (let me call db A) and when I access it, I get following result. I don’t have full access to this db so I cannot experiment a lot here.

SYSTIMESTAMP CURRENT_TIMESTAMP LOCALTIMESTAMP DBTIMEZONE SESSIONTIMEZONE
--------------------------------------------------------- --------------------------------------------------------- ------------------------------------------------ --------------------- ----------------------------
27-MAR-13 02.31.55.041411 AM +00:00 26-MAR-13 07.31.55.041416 PM -07:00 26-MAR-13 07.31.55.041416 PM +00:00 -07:00

I’m in PST timezone.
I have my db which I have full access as well as its host.
I can make result like db A on my db if I started up db and its listener while TZ environment variable equal to UTC.

Now I saw in other post that someone was trying to retrieve systimestamp value in a job executed via dbms_scheduler.run_job.
So I did that in two ways. 1 with use_current_session = true and 2 is false for the same.
On my db, results are the same (both returns time in UTC) but on db A, I got UTC time when use_current_session = true and PST when use_current_session = false.
----------------
So questions are:
What could be the difference in setup between my db and db A?
Is there a query, logfile, or anything I should check to find out what can be the difference?
----------------
Any clue about where to check will be appreciated as well and please let me know if there is some additional information necessary to provide me some help on this.

I tried to find the cause with my db and I could see the same result as db A which is to see UTC time if use_current_session = true and PST time if use_current_session = false by bringing up the db listener after I set TZ environment variable equal to PST8PDT. However this causes systimestamp from sqlplus session become also a PST time.

The reason I’m playing around with the setup and checking systimestamp value is because we are facing the situation where everywhere except pl/sql job submitted by enterprise scheduler service is pointing wrong timezone (PST instead of UTC) and I’ve been searching the solution or clue for where to look at.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 24 2013
Added on Mar 27 2013
0 comments
204 views