sql time out error

T

TaeHo Yoo

Hi all,

I have a asp scripts which runs a stored procedure which runs for about
30 seconds to generate a dataset. Somehow this page generates the
time-out error. To find out what is wrong with page, I used SQL Profiler
to monitor on when the request hits the database and discovered that it
takes about 10 mins before the request shows up.. A lot of other
requests from various scripts appear and then by the time my script
generates the time-out error, SQL Profiler shows the request. How to fix
it? Is there any way of telling the sql server to put a priority on this
query first?

The following is the details of the request that SQL Profiler shows up

eventclass : SQL:BatchCompleted
Textdata: exec myscript blah blah
Application Name: Microsoft¢ç Windows¢ç Operating System
NT username:
LoginName : my login name
CPU : 157875
Duration :6128

Any idea will be fantastic!!!

Thanks
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

Without seeing the code is very difficult.
If you run the SP from query analyzer , how much time it takes?

I think that you are not coding correctly the DB access code, are you using
the same connection string? do you close the connection ASAP?

post the code you use to query the DB

cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top