开发者

How to make SQL SERVER command timeout interactive?

I have a WPF application which is using EF4 to connect to a sql server 2008 database. We have a lot of services which are hitting the same database concurrently.This results in one or the other query timing out because of locking of same table by other query.

Now we have all optmizations in place but still we have timeouts with 开发者_如何转开发a default 30 seconds timeout.

We have the following options:-

  1. Make commandtimeout configurable and keep it to some limit that works without timeout.
  2. Make it user dependent. Like in asp.net, we track that user session is about to timeout. Does user want to extend? So on the similal lines I want to prompt to the user that this command needs more time to execute. Do u want to wait?

With option 1, In case load increases user will have to change this config settings many times and it will become a maintenance bottleneck. Therefore, we have decided to go with option 2. Has anyone of you done this before. Please suggest a solution or approach.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜