Re: Coping with slow SQL Servers in ASP.NET
- From: Alexey Smirnov <alexey.smirnov@xxxxxxxxx>
- Date: Fri, 1 Feb 2008 02:41:52 -0800 (PST)
On Feb 1, 11:10 am, "Microsoft Newsserver" <m...@xxxxxxxxxxx> wrote:
Hi,
We have situations occasionally where the SQL server is extremely slow to
respond. The problm is that the user is left with loading page and has no
idea what in heaven is going on.
Does anyone have any ideas how the DAL can be confiured to timeout and throw
an exception if the response is not quick enough ?
Cheers
Add "Connect Timeout=<seconds>;" to your connection string and use a
try-catch to handle the sql exception.
You can also try to execute that slow task using an asynchronous call.
If it's a buk copying process, look at the SqlBulkCopy Class
(System.Data.SqlClient)
.
- References:
- Coping with slow SQL Servers in ASP.NET
- From: Microsoft Newsserver
- Coping with slow SQL Servers in ASP.NET
- Prev by Date: Coping with slow SQL Servers in ASP.NET
- Next by Date: Re: Coping with slow SQL Servers in ASP.NET
- Previous by thread: Coping with slow SQL Servers in ASP.NET
- Next by thread: Re: Coping with slow SQL Servers in ASP.NET
- Index(es):
Relevant Pages
|