Profiler shows DATETIME for TVP as DATETIME2 - by Florian Reischl

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 524961 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 1/14/2010 9:47:12 AM
Access Restriction Public

Description

DATETIME as column of a table-valued type are interpreted as DATETIME2 in SQL Profiler.

When tracing an application (e.g. C#) which works with table-valued parameters DATETIME columns are shown as nano-seconds in Profiler. This causes the output SQL to be invalid for execution in SSMS.
Sign in to post a comment.
Posted by Microsoft on 3/29/2010 at 11:27 AM
Hi again Florian,

Just an update that this will be fixed in the next major release of SQL Server.

Thanks
- Tobias, SQL Server Engine
Posted by Florian Reischl on 1/16/2010 at 3:13 AM
Hi Tobias,

Sure.

* Execute the CREATE TYPE script I posted above to create "FooType"
* Open Profiler
* Create a new trace with event "RPC:Completed"
* Execute the C# sample code I posted above
* Look at profiler "TextData" output. You will see that value for column "Dt" is shown as DATETIME2

I attached a screenshot which shows the output.

I reproduced this behavior on XP and W7 with 32 bit and 64 bit OS and SQL Server Engine.

Greets
Flo
Posted by Microsoft on 1/15/2010 at 12:48 PM
Hi Florian,

Can you please provide the information related to what columns you are looking at in SQL Profiler. A repro for the Profiler bit would help (i.e. open Profiler, Create new trace, ...).

Thanks!
- Tobias, SQL Server Engine