user822166
user822166

Reputation: 11

Query takes for ever on SQL server to execute

Following is the error message I get when I tried to execute Select * for the table in SQl Server, Any suggestions would be appreciated.

"lock request time out period exceeded sql server"

Upvotes: 0

Views: 409

Answers (2)

CResults
CResults

Reputation: 5105

Look at SQL hints, in particular WITH (NOLOCK)

http://www.developerfusion.com/article/1688/sql-server-locks/4/

Upvotes: 1

Clement Herreman
Clement Herreman

Reputation: 10536

When you do you SELECT you're locking the table. But your SELECT takes so much time, that SQL ends it, in order not to keep the table locked, mainly because SQL server thinks it's a bug.

Upvotes: 0

Related Questions