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.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Problems executing SP from web server vs SSMS

Author  Topic 

MuadDBA

628 Posts

Posted - 2008-08-21 : 17:01:56
I have a stored procedure that, if I execute it using SSMS or QA, it returns data very quickly, and only uses about 120K reads according to profiler. However, if the exact same command is executed from the web server asp page call, it times out after 30 seconds and uses over 3 million reads.

I am looking for possible explanations. The SQL Batch String is the same for each, and if I restore the DB to a different DB server and execute it from the web asp page, it works fine....

I'm stumped. Any ideas?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-08-21 : 17:02:51
Have you compared the execution plans?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page

MuadDBA

628 Posts

Posted - 2008-08-22 : 11:34:51
So, this morning I came in and found out that the switch port they were on was loose, and they swapped to a different port and all is well now. I am not sure why this would result in different results from the web server vs my computer, but I'm happy it's working again.
Go to Top of Page
   

- Advertisement -