views:

12

answers:

0

Background : We are using VS2008, ASP.NET .NET 3.5 and Entity Framework, with a SQL 2000 database. I am using SQL Profiler 2005 to capture LINQ sp_executesql statements on a SQL 2000 server.

Problem : In SQL Profiler the sp_executesql @stmt parameter is being randomly truncated; the @stmt SQL is normally rather large as I'm querying across several tables, with a few includes. This means I cannot copy & paste into SSMS to re-execute the SQL and to check that it's working properly, as the T-SQL is not valid.

An example of the issue;

exec sp_executesql N'SELECT
...
...
...
...
WHERE [Extent1].[Guid] = ', N'@p__linq_111 uniqueidentifier', @p__linq_111 = '58047ED6-B4E9-4A33-90A3-F9840444F3DB'

The actual transaction executes successfully and returns results to my ASP.NET code, but it's clearly not the same as the one being captured in SQL Profiler.

I'm wondering whether it's because I'm working with SQL 2000 instead of SQL 2005.

Any ideas? Anyone else experience this?