Otis wrote:
Could you elaborate what kind of syntax errors? Because the SQL isnt different from sqlserver 2000's....
I was just asking if anyone has successfully managed to run the tuning advisor in 2005 agaisnt an output from LLBLGen... It's probably a problem with SQL Server 2005 rather than LLBLGen.
Here's what happens:
Basically if I run a trace using the profiler (which I've done successfully many times with SQL Server 2000 ) and save it to a file, I should be able to run the Tuning Wizard (now called the tuning advisor) against this file and it will highlight missing indexes etc.
With SQL Server 2005, the Database Tuning Advisor reports during the "Consuming Workload" phase of the Analysis: "85% of the consumed workload has syntax errors"
Here is a selection of the errors from the log which include some security and other issues:
S001 declare @FolderID bigint,@ItemID bigint,@IsActive bit
select @FolderID=107,@ItemID=1455,@IsActive=1
INSERT INTO [ModernArk].[dbo].[Ark_FolderItemLink] ([FolderID], [ItemID], [IsActive]) VALUES (@FolderID, @ItemID, @IsActive) declare @FolderID bigint,@ItemID bigint,@IsActive bit
select @FolderID=107,@ItemID=1455,@IsActive=1 1 Statement does not reference any tables
S008 exec sp_executesql N'INSERT INTO [ModernArk].[dbo].[Ark_FolderItemLink] ([FolderID], [ItemID], [IsActive]) VALUES (@FolderID, @ItemID, @IsActive)',N'@FolderID bigint,@ItemID bigint,@IsActive bit',@FolderID=107,@ItemID=1460,@IsActive=1 1 Event does not reference any tables
S008 BEGIN TRANSACTION 54 Event does not reference any tables
E000 IF @@rowcount = 0 54 [Microsoft][SQL Native Client][SQL Server]Incorrect syntax near '0'.
Basically it seems ALL the "exec sp_executesql N'...'" is ignored because it thinks they dont reference any tables...
I just wanted to confirm if this is just me or does everyone have this same problem?
Marcus