• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1167
  • Last Modified:

Getting Cannot Obtain Lock resource on database queries

This is a strange one.  I have browsed the net and made sure that I have ample lock resources.  The exact error is:

The instance of the SQL Server Database Engine cannot obtain a LOCK resource at this time. Rerun your statement when there are fewer active users. Ask the database administrator to check the lock and memory configuration for this instance, or to check for long-running transactions.

This is a development server and there are no long running transactions.  I have 8GB RAM on the server, running Server 2003 x64.

When running stored procedures I am able to use:
SET LOCK_TIMEOUT -1
EXEC sp_indexoption 'SCACCT', 'disallowpagelocks', TRUE
EXEC sp_indexoption 'SCACCT', 'disallowrowlocks', TRUE

then reset the index options to false after the query runs.  But when passing query directly from APP, or when I don't use this, I get the error.  A couple of times I have been able to rebuild the indexes to make it work, but the intermittance of this error is becoming frustrating.

Has anyone encountered this error and found a resolution previously?
0
GeoffSutton
Asked:
GeoffSutton
  • 2
  • 2
1 Solution
 
randy_knightCommented:
approx how many user connections do you have when this happens?
0
 
GeoffSuttonAuthor Commented:
1.  Possibly 2.  Very few, since it's a development server.
0
 
randy_knightCommented:
wow ... usually this kind of thing comes up with lots of connectsion (say 1000+)

have you checked sql server memory configuration ... also memory perfmon counters under sql server object?
0
 
GeoffSuttonAuthor Commented:
I have not.  I am primarily a software developer, so getting into configuring SQL server and memory is beyond my area of expertise.  So far as I know, the server is configured to use all available memory.  How would I go about verifying this, and also using Perfmon?

Thanks

Geoff
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now