Monday, March 26, 2012

Ms Sql Server Giving Timeout Expired

We are using MS SQL 2000 it is giving timeout expired proble Intermittently and the users getting slow response in the Transactions.
Need Help to solve the same.The ConnectionTimeout property of the Connection object, should be increased as much as is needed (applicable to VB6, .Net). I think that any languagae has a similar property.|||Take also in account this method .|||Hi,

In some servers, if the Select statement is run with out specifying WITH (NOLOCK) then it will throw timeout expired.

Suppose you run the following query from your application

Select * from emp;

then it will throw time out expired

Please use

Select * from emp WITH (NOLOCK);

then it wont expire. I am not sure of which server setting that causes this problem.
The application will be slow if some one is trying to run a select statement without using "WITH (NOLOCK)"

Try to avoid users from executing the Select statement, which poses this problem.

Also if many Users are accessing the DB, then we should give some time for the DB to process it. If many processes queues up, then finally some will expire.This is purely due to the load on the DB.

Also monitor the performance of DB, some stored procedures that we write will eat up all DB resources because of which the application will hang up until that is executed.

It may also be due to increase in number of users using the application.

Hope this will be useful.|||Ye, good observation, but I think that it's not always recommended to use NOLOCK, and for any Select. Eventually for special queries where it's expected to take a long time.

No comments:

Post a Comment