Microsoft KB Archive/307946

From BetaArchive Wiki
Knowledge Base


FIX: SQL Profiler Truncates Seconds and Milliseconds for Datetime RPC Parameter

Article ID: 307946

Article Last Modified on 10/16/2003



APPLIES TO

  • Microsoft SQL Server 2000 Standard Edition



This article was previously published under Q307946

BUG #: 355338 (SHILOH_BUGS)

SYMPTOMS

When a datetime value is sent to SQL Server by way of a remote procedure call (RPC), if a trace is running, the datetime value is formatted as a string and sent to the specified trace file or SQL Profiler. During this formatting, the seconds and milliseconds specified for this parameter are truncated, so the value shows in the RPC:Starting or RPC:Completed events in a form that resembles the following:

exec sp_executesql N'select @P1', N'@P1 datetime', 'Aug 24 2001 12:59PM'
                

Note that this problem is specific to the formatting and display of this value for a trace. The full datetime value is correctly passed to the stored procedure that is being called.

CAUSE

In converting the datetime to its string representation, the value is truncated.

RESOLUTION

To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack


STATUS

Microsoft has confirmed that this is a problem in Microsoft SQL Server 2000. This problem was first corrected in Microsoft SQL Server 2000 Service Pack 2.

Keywords: kbbug kbfix KB307946