title: Sql Server 2005 - cannot obtain a LOCK resource
body: <p>The observed problem and <code>error message</code> is:</p>
  
  <pre><code>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
  </code></pre>
  
  <p><strong>Environment</strong>: SQL Server 2005 Standard edition on Windows server 2003 Standard edition. Virtualized on a VM - with 8 GB RAM
  Automatic applications are processing data - reading raw data and writing results to the database. These applications get the error message and they crash on it. (There are also database backup and index maintenance jobs scheduled.)</p>
  
  <p>The same error was never observed on a similar system with sql server 2005 enterprise edition and windows 2003 enterprise edition.</p>
  
  <p>I have already searched the web and found some answers. But e.g. 
  <a href="https://stackoverflow.com/questions/289969/sql-server-cannot-obtain-a-lock-resource-at-this-time-what-to-do">SQL Server cannot obtain a LOCK resource at this time - What to do?</a>
  was not helpful in my case</p>
  
  <p>One source suggested to check:</p>
  
  <pre><code>SELECT request_session_id, COUNT (*) num_locks
  FROM sys.dm_tran_locks
  GROUP BY request_session_id 
  ORDER BY count (*) DESC
  </code></pre>
  
  <p>One session came up with 10.</p>
  
  <p>The memory and lock settings are both in the default settings.</p>
  
  <p>My current idea is to purge most of the data which is old and can be removed. </p>
  
  <p>Does anybody have any other ideas how to deal with the lock resource problem? What exactly is its cause?  Does SQL server standard edition allow less resources - is the problem related to the sql server version? How to fix the issue?</p>