Solved

Getting Cannot Obtain Lock resource on database queries

Posted on 2008-10-20
4
1,141 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Trigger for audit 26 71
SQL HELP 2 82
Sql Data via Excel--performance issues 2 55
get most recent and second most recent date in SQL Server 24 79
Introduction This article will provide a solution for an error that might occur installing a new SQL 2005 64-bit cluster. This article will assume that you are fully prepared to complete the installation and describes the error as it occurred durin…
Data architecture is an important aspect in Software as a Service (SaaS) delivery model. This article is a study on the database of a single-tenant application that could be extended to support multiple tenants. The application is web-based develope…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

910 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now