sql server - MS SQL Timeout on ASP.NET Page but not in SSMS -
when sproc executed on 1 of our asp.net pages, times out on sql server exception timeout expired. timeout period elapsed prior completion of operation or server not responding.
. when execute same sproc in ssms, returns relatively quickly. sql server , iis on same box. logged in same user in both places. other pages fine.
probably parameter sniffing.
my answer here gives queries can use retrieve both execution plans (the ssms 1 , asp.net one) compare , contrast.
edit
this might more useful query actually.
use yourdatabase; select * sys.dm_exec_cached_plans cross apply sys.dm_exec_sql_text(plan_handle) cross apply sys.dm_exec_query_plan(plan_handle) cross apply sys.dm_exec_plan_attributes(plan_handle) epa sys.dm_exec_sql_text.objectid=object_id('yourprocname') , attribute='set_options'
Comments
Post a Comment