| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Trace file tim values
Different OS use different epoch values. Our Linux box uses 1/1/70 00:00 G=
MT (the Unix Epoch). Windows apparently uses instance restart time as it=
s epoch. It's "just" a matter of studying it long enough to figure out w=
hat epoch value AIX uses.=20
Although I've never done it myself, you could do something like the follo= wing pretty quickly if you really want to find out. Execute dbms_system.= ksdddt and parse(select * from dual) in rapid succession. Use Perl to co= nvert the Oracle timestamp produced by ksdddt to a seconds-since-Unix-Epo= ch number. The difference ksdddt =96 adjacent-tim is the offset that you= should be able to use to convert any tim value to the equivalent wall-ti= me. (On Linux, that offset is 0. On Windows, that offset is the time of i= nstance restart. On AIX, I presume that the offset will have some derivab=le functional meaning.)
Also, if you have the book "Optimizing Oracle Peformance" (Millsap/Holt f= rom O'Reilly), there's a section on just this topic (tim value "decoding"= ). =20
But, in the meantime, maybe this will get you started.
Karen Morton
Hotsos Enterprises, Ltd.
http://www.hotsos.com
Upcoming events at http://www.hotsos.com/education/schedule.html
=20
-----Original Message-----
From: Ben Sauer [mailto:SauerBL_at_ldschurch.org]=20
Sent: Wednesday, May 11, 2005 11:05 AM
To: oracle-l_at_freelists.org
Subject: Trace file tim values
I ran a test this morning on a database involving a trace on an Oracle 9i=
2 database running on AIX with a Windows front end.
I was under the impression that the tim value in the header was millions o=
f seconds since the epoch. But when I try and convert these values to ti=
mestamps
I get dates that are July 12 of 2004. Anybody explain what I'm missing o=
r
point me at the right reference book.
Thanks,
Ben.
-- http://www.freelists.org/webpage/oracle-lReceived on Wed May 11 2005 - 14:36:10 CDT
![]() |
![]() |