Hello,This is a very strange problem I am having with a query.It looks like this:SP_Websetfilters @reportId int, @FilterNumber int, @StartDate datetime, @EndDate datetime, @DropDownList1 varchar(1000), @DropDownList2 varchar(1000)...-- Test table to verify input variables from web applicationInsert into TestSetFilters VALUES (@reportID, getdate(), @FilterNumber, @StartDate, @EndDate, @DropDownList1, @DropdownList2)Insert into TestSetFilters VALUES (@reportID, getdate(), @FilterNumber, null, null, SUSER_NAME(), HOST_NAME())...<< continuing stored procedure using linked server historian etc).>>
When I run this SP from the management console, it logs this into testsetfilters table (actually these are just all input variables I can think of):953797 17 2010-11-29 19:06:52.823 6 NULL NULL ODRMGS\pradmin RPT1953796 17 2010-11-29 19:06:52.823 6 2010-11-01 00:00:00.000 2010-11-30 00:00:00.000 1 emptyAnd it has a result query.But when I run this query from a website, that has the same user impersonation as above, it logs exactly the same as variables:952897 17 2010-11-29 19:06:46.073 6 NULL NULL ORDMGS\pradmin RPT1952896 17 2010-11-29 19:06:46.073 6 2010-11-01 00:00:00.000 2010-11-30 00:00:00.000 1 emptyBut it does TIMEOUT and I get no data. The problem is not in the website because I also log the retrieved query into a table, and the SP running in SMT gets the data but using the asp website the table is not filled. So the timeout is in sql.How can this be possible? I think I run this SP twice with exactly the same parameters and user, but one always timeouts and the other runs in 4 seconds.Please help me this is really getting on my nerves. After some rebooting etc the problem can sometimes be solved out of nowhere. But it always comes back after a while.