Re: Trace File with null time SQL2000



Munish Narula (munish.narula@xxxxxxxxx) writes:
I was just wondering as to how many more events are there which do not
have starttime AND endtime values. I know there are a lot of events
which do not have endtime, but have starttime. But, is
ExistingConnection, the only one of its kind having both starttime and
endtime as null.

On SQL 2005 you can determine this with help of this query.

SELECT *
FROM sys.trace_events e
WHERE NOT EXISTS
(SELECT *
FROM sys.trace_event_bindings eb
JOIN sys.trace_columns c
ON eb.trace_column_id = c.trace_column_id
WHERE e.trace_event_id = eb.trace_event_id
AND c.name IN ('StartTime', 'EndTime'))


It returns one single event: Deprecated.

One more event does not have a start time: Blocked Process Report.

For SQL 2000, the only way to find out is to read Books Online and hope that
the documentation is correct.

--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Re: Trace File with null time SQL2000
    ... starttime and endtime as null. ... Tne ExistingConnection is not documented to populate neither StartTime ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (microsoft.public.sqlserver.security)
  • Re: Profiler: Duration vs Difference between StartTime and EndTime
    ... I am not certain how duration is calculated, but I regularly see numbers that are wildly inaccurate. ... "Expert SQL Server 2005 Development" ... The duration for some of the statements was just under 1 minute, however for the same statements the difference between the starttime and endtime were closer to 17 ms. ...
    (microsoft.public.sqlserver.tools)
  • RE: calculating difference between date/time fields
    ... Function BusinessHours(StartTime As Date, Endtime As Date) ... Dim DiffTime As Double ... If Endtime < StartTime Then ...
    (microsoft.public.excel.programming)
  • Re: Delphi 6 vs C# speed comparison
    ... str: string; ... startTime: TDateTime; ... endTime: TDateTime; ...
    (borland.public.delphi.non-technical)
  • RE: calculating difference between date/time fields
    ... Function BusinessHours(StartTime As Date, Endtime As Date) ... Dim DiffTime As Double ... If Endtime < StartTime Then ...
    (microsoft.public.excel.programming)