SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Date/Times are not right

 
Reply to topic    SoftTree Technologies Forum Index » DB Audit, DB Mail, DB Tools View previous topic
View next topic
Date/Times are not right
Author Message
Rich Stucke



Joined: 16 Jan 2000
Posts: 4

Post Date/Times are not right Reply with quote

I have OMS 2.05

This could be a bug or just a configuration problem on my, end but I need to try to resolve it regardless. The Date/Time displayed, when the Connections Icon is selected, is incorrect.

This did not come up as a critical issue until recently. I needed to track several sessions that would lock up when started, but the only way I could identify them is the time they logged on. Unfortunately all of my Date/Times displayed are wrong. i.e. today which is 10/22/1999 13:21:35 is displaying 12/5/99 7:32:56.

We have a different date format as our default date format which is:

YYYY-MM-DD HH:MI.SS . Could this be the problem ??
And if it is how can I fix this ? or Is this a bug ?

Thanks for an excellent product,

Rich

Fri Oct 22, 1999 5:07 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Re: Date/Times are not right Reply with quote

This "Last Activity" date/time is calculated as "sysdate - (v$timer.hsecs - v$sesstat.value) / 8640000" where we use v$sesstat for statistics#=13 which is session last activity time in 100ths of seconds since the beginning of the epoch. The v$timer.hsecs returns the system time in 100ths of seconds since the beginning of the epoch. Both times wraps around to 0 after about 479 days. Anyway, if you do not have TIMED_STATISTICS enabled in the parameter file (INIT.ORA) most likely that v$sesstat.value is equal to 0 for any session and therefore the described formula produces incorrect result.

: I have OMS 2.05

: This could be a bug or just a configuration problem on my, end but I need to
: try to resolve it regardless. The Date/Time displayed, when the
: Connections Icon is selected, is incorrect.

: This did not come up as a critical issue until recently. I needed to track
: several sessions that would lock up when started, but the only way I could
: identify them is the time they logged on. Unfortunately all of my
: Date/Times displayed are wrong. i.e. today which is 10/22/1999 13:21:35 is
: displaying 12/5/99 7:32:56.

: We have a different date format as our default date format which is:
: YYYY-MM-DD HH:MI.SS . Could this be the problem ??
: And if it is how can I fix this ? or Is this a bug ?

: Thanks for an excellent product,

: Rich

Fri Oct 22, 1999 6:59 pm View user's profile Send private message
Rich Stucke



Joined: 16 Jan 2000
Posts: 4

Post Re: Date/Times are not right Reply with quote

: This "Last Activity" date/time is calculated as "sysdate -
: (v$timer.hsecs - v$sesstat.value) / 8640000" where we use v$sesstat
: for statistics#=13 which is session last activity time in 100ths of
: seconds since the beginning of the epoch. The v$timer.hsecs returns the
: system time in 100ths of seconds since the beginning of the epoch. Both
: times wraps around to 0 after about 479 days. Anyway, if you do not have
: TIMED_STATISTICS enabled in the parameter file (INIT.ORA) most likely that
: v$sesstat.value is equal to 0 for any session and therefore the described
: formula produces incorrect result.

I do have timed_statistics turned on in the init.ora parameters. I checked the v$timer and v$sesstat.statistics #13 and both are being updated regularly. So the only thing I can't verify is how sysdate is being defined.

Mon Oct 25, 1999 11:39 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Re: Date/Times are not right Reply with quote

sysdate is a function that returns system date/time in internal format as date/time value (not a string resentation). Anyway, the only way to get a future date using the described formula is to have Oracle calculate negative value for the (v$timer.hsecs - v$sesstat.value) difference. When was your server instance restarted last time?

: I do have timed_statistics turned on in the init.ora parameters. I checked
: the v$timer and v$sesstat.statistics #13 and both are being updated
: regularly. So the only thing I can't verify is how sysdate is being
: defined.

Mon Oct 25, 1999 2:14 pm View user's profile Send private message
Rich Stucke



Joined: 16 Jan 2000
Posts: 4

Post Re: Date/Times are not right Reply with quote

: sysdate is a function that returns system date/time in internal format as
: date/time value (not a string resentation). Anyway, the only way to get a
: future date using the described formula is to have Oracle calculate
: negative value for the (v$timer.hsecs - v$sesstat.value) difference. When
: was your server instance restarted last time?

The last time the instance was restarted was 1999-10-23 13:43.09 which is :
October 23, 1999 at 1:43 PM. We use system date_time timestamps in many of our tables and they report the time correctly. It is only invalid times displayed with OMS.

If you give me an email address, I can send you more information in a more timely manner.

Wed Oct 27, 1999 2:01 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Re: Date/Times are not right Reply with quote

: The last time the instance was restarted was 1999-10-23 13:43.09 which is :
: October 23, 1999 at 1:43 PM. We use system date_time timestamps in many of
: our tables and they report the time correctly. It is only invalid times
: displayed with OMS.

: If you give me an email address, I can send you more information in a more
: timely manner.

You can email to support@softtreetech.com .

In a mean time you can verify the last activity datetime value reported by OMS by running the following SQL query:

select to_char(sysdate - (v$timer.hsecs - v$sesstat.value) / 8640000)
from v$timer, v$sesstat
where statistics#=13

Please let me know if this value is different.

Wed Oct 27, 1999 4:41 pm View user's profile Send private message
Rich Stucke



Joined: 16 Jan 2000
Posts: 4

Post Re: Date/Times are not right Reply with quote

: You can email to support@softtreetech.com .

: In a mean time you can verify the last activity datetime value reported by
: OMS by running the following SQL query: select to_char(sysdate -
: (v$timer.hsecs - v$sesstat.value) / 8640000)
: from v$timer, v$sesstat
: where statistics#=13

: Please let me know if this value is different.

You had an error in your query... it should be statistic#=13. In any case I ran your query on November 1st, and these are my results:

1999-10-28 11:47.16
1999-10-28 11:47.16
1999-10-28 11:47.16
1999-10-28 11:47.16
1999-10-28 11:47.16
1999-10-28 11:47.16
1999-10-28 11:47.16
1999-12-11 12:21.36
1999-12-11 12:20.50
1999-12-11 11:40.27
1999-12-11 12:21.39
1999-12-11 12:21.38
1999-12-11 11:37.55
1999-12-11 12:20.50
1999-12-11 11:40.27
1999-12-11 12:21.35
1999-12-11 11:13.10
1999-12-11 12:21.33
1999-12-11 12:00.29
1999-12-11 12:00.26
1999-12-11 12:00.25
1999-12-11 11:59.41
1999-12-11 11:59.40
1999-12-11 11:07.35
1999-12-11 10:52.18
1999-12-11 11:59.40
1999-12-11 12:00.10
1999-12-11 11:07.35
1999-12-11 11:59.41
1999-12-11 11:59.52
1999-12-11 12:00.16
1999-12-11 11:59.41
1999-12-11 11:59.58
1999-12-11 12:00.02
1999-12-11 11:19.14
1999-12-11 11:59.41
1999-12-11 11:59.41
1999-12-11 11:57.57
1999-12-11 11:59.41
1999-12-11 11:58.02
1999-12-11 12:00.17
1999-12-11 11:59.41
1999-12-11 12:00.28
1999-12-11 12:00.16
1999-12-11 11:59.56

This is obviously not Dec 11, 1999.

Please advise what is going on.

Mon Nov 01, 1999 11:48 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Re: Date/Times are not right Reply with quote

For some reasons the v$sesstat.value is not accurate for statistic#=13
I will search on that.

For now try using the Connection Monitor (SQL tab page) to get an idea on time of the "last" executed statement (accuracy of this information depends on the monitor refresh frequency).

: You had an error in your query... it should be statistic#=13. In any case I
: ran your query on November 1st, and these are my results: 1999-10-28
: 11:47.16
: 1999-10-28 11:47.16
: 1999-10-28 11:47.16
: 1999-10-28 11:47.16
: 1999-10-28 11:47.16
: 1999-10-28 11:47.16
: 1999-10-28 11:47.16
: 1999-12-11 12:21.36
: 1999-12-11 12:20.50
: 1999-12-11 11:40.27
: 1999-12-11 12:21.39
: 1999-12-11 12:21.38
: 1999-12-11 11:37.55
: 1999-12-11 12:20.50
: 1999-12-11 11:40.27
: 1999-12-11 12:21.35
: 1999-12-11 11:13.10
: 1999-12-11 12:21.33
: 1999-12-11 12:00.29
: 1999-12-11 12:00.26
: 1999-12-11 12:00.25
: 1999-12-11 11:59.41
: 1999-12-11 11:59.40
: 1999-12-11 11:07.35
: 1999-12-11 10:52.18
: 1999-12-11 11:59.40
: 1999-12-11 12:00.10
: 1999-12-11 11:07.35
: 1999-12-11 11:59.41
: 1999-12-11 11:59.52
: 1999-12-11 12:00.16
: 1999-12-11 11:59.41
: 1999-12-11 11:59.58
: 1999-12-11 12:00.02
: 1999-12-11 11:19.14
: 1999-12-11 11:59.41
: 1999-12-11 11:59.41
: 1999-12-11 11:57.57
: 1999-12-11 11:59.41
: 1999-12-11 11:58.02
: 1999-12-11 12:00.17
: 1999-12-11 11:59.41
: 1999-12-11 12:00.28
: 1999-12-11 12:00.16
: 1999-12-11 11:59.56

: This is obviously not Dec 11, 1999.

: Please advise what is going on.

Mon Nov 01, 1999 12:39 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7833

Post Re: Date/Times are not right Reply with quote

As I found out you need to have the RESOURCE_LIMIT parameter set to true, then for each user who has a profile with idle_time defined, Oracle records the entry
of v$timer (seen in v$sesstat for statistic#=13 wich is session "last non-idle time") as soon as a session of that user becomes inactive.

I have no idea what Oracle records for statistic#=13 when onne of the above has not been set.

: You had an error in your query... it should be statistic#=13. In any case I
: ran your query on November 1st, and these are my results: 1999-10-28
: 11:47.16
: 1999-10-28 11:47.16
: 1999-10-28 11:47.16
: 1999-10-28 11:47.16
: 1999-10-28 11:47.16
: 1999-10-28 11:47.16
: 1999-10-28 11:47.16
: 1999-12-11 12:21.36
: 1999-12-11 12:20.50
: 1999-12-11 11:40.27
: 1999-12-11 12:21.39
: 1999-12-11 12:21.38
: 1999-12-11 11:37.55
: 1999-12-11 12:20.50
: 1999-12-11 11:40.27
: 1999-12-11 12:21.35
: 1999-12-11 11:13.10
: 1999-12-11 12:21.33
: 1999-12-11 12:00.29
: 1999-12-11 12:00.26
: 1999-12-11 12:00.25
: 1999-12-11 11:59.41
: 1999-12-11 11:59.40
: 1999-12-11 11:07.35
: 1999-12-11 10:52.18
: 1999-12-11 11:59.40
: 1999-12-11 12:00.10
: 1999-12-11 11:07.35
: 1999-12-11 11:59.41
: 1999-12-11 11:59.52
: 1999-12-11 12:00.16
: 1999-12-11 11:59.41
: 1999-12-11 11:59.58
: 1999-12-11 12:00.02
: 1999-12-11 11:19.14
: 1999-12-11 11:59.41
: 1999-12-11 11:59.41
: 1999-12-11 11:57.57
: 1999-12-11 11:59.41
: 1999-12-11 11:58.02
: 1999-12-11 12:00.17
: 1999-12-11 11:59.41
: 1999-12-11 12:00.28
: 1999-12-11 12:00.16
: 1999-12-11 11:59.56

: This is obviously not Dec 11, 1999.

: Please advise what is going on.

Mon Nov 01, 1999 4:50 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » DB Audit, DB Mail, DB Tools All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.