sql server 2005 - A long stored procedure stops returning results after some execs, why? -
hi i've long stored procedure used populate gridview in asp.net(c#) application , console application(c#). every time run sp on management studio works fine. days sp stops returning values applications (but @ same time works fine when executed management studio). why or how can happen? (i'm using ms sql 2005 , win server 2003) thanks
you haven't given detail guess getting timeout errors , have parameter sniffing issue (running fine in ssms not applications bit of give away this.)
next time issue arises such doesn't work application works fine ssms use following query retrieve both plans , compare.
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