Solved

Getting Cannot Obtain Lock resource on database queries

Posted on 2008-10-20
4
1,150 Views
Last Modified: 2008-10-29
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
Comment
Question by:GeoffSutton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

by:randy_knight
ID: 22761532
approx how many user connections do you have when this happens?
0
 
LVL 10

Author Comment

by:GeoffSutton
ID: 22761599
1.  Possibly 2.  Very few, since it's a development server.
0
 
LVL 4

Expert Comment

by:randy_knight
ID: 22761638
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
 
LVL 10

Accepted Solution

by:
GeoffSutton earned 0 total points
ID: 22761665
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question