Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
VijayDebnath
Starting Member
1 Post |
Posted - 2009-10-12 : 12:00:16
|
I am executing a Stored Procedure from .NET which gives timeout error and my command timeout is 60 seconds.Same stored procedure when executed from SQL Management studio returns result in 6 seconds.I am unable to understand why this ia happening.I have tried with both ExecuteReader and ExecuteDataset .NET method, but same result. |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
tbean
Starting Member
1 Post |
Posted - 2009-10-14 : 16:30:05
|
Tara,We recently installed a new server running SQL Server 2008 and have had a time-out problem with a stored procedure, executed from a .NET appliation. The stored procedure executed fine on SQL Server 2005 running on a server with fewer processors and less memory.I don't know how moving to SQL Server 2008 would have affected the stored procedure. Your comment about execution plans being different made me wonder if recompiling the stored procedure would solve the problem so I ran sp_recompile against it. The next time the .NET application ran the stored procedure, it executed successfully.Would you recommend running sp_recompile for all the stored procedures in our databases?Thanks,Tom |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|