cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Summary

The following error may occur when running a reconcile. This article contains a description of the issue and possible resolutions. "Error: 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."

Symptoms

You may see the following error message displayed in the Importer log:

2018-01-16 05:42:34,348 [INFO ] Failed to execute Writer 'DeleteUnrequiredInstalledFileEvidence' from file E:\FNMSProgramData\Flexera Software\Compliance\ImportProcedures\Inventory\Writer\FileEvidence.xml, at step line 13
Error: 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.
2018-01-16 05:42:34,348 [INFO ] All retries have been attempted for Writer 'DeleteUnrequiredInstalledFileEvidence'
2018-01-16 05:42:34,363 [ERROR] System.Data.SqlClient.SqlException (0x80131904): 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.?

Cause

Possible causes of this issue:

  • A reconcile was running and changing DB data at the same time a Web UI user changed the same table. For example when the license reconcile is running and updating licenses, if a user was to save a license this can stop the reconcile as the lock will be held by the Web UI user.

On-premise only:

  • Database settings are not set correctly according to the product specifications, for example if a database is set to a FULL recovery model instead of SIMPLE. To confirm the settings use the following query:
    SELECT * 
    FROM sys.dm_exec_requests 
    CROSS APPLY sys.dm_exec_sql_text(sql_handle) 
    SELECT * 
    FROM sys.sysprocesses 
    WHERE open_tran = 1 
    SELECT * 
    FROM sys.databases 
    DBCC SQLPERF(logspace)
  • SQL Server memory allocation has not been configured to have enough resources.
  • SQL Server affected by a known bug in certain versions (see the Microsoft link in the Additional info section below).

Resolution

Firstly, re-run the reconcile and confirm if the issue can be reproduced. It may be advisable to run this when the system is expected to be idle and to change the scheduled job as necessary. If the issue reoccurs it will need further investigation by engineering. For Cloud customers, there can be limited troubleshooting beyond attempting to re-run a reconcile - so contact support for assistance if still continuing issues.

To adjust the database settings (for recovery model, etc):

  1. Open SQL Server Management Studio and connect to the relevant instance.
  2. Right-click the DB and click Properties.
  3. Click the Options tab.

To adjust SQL Server memory allocation:

  1. Open SQL Server Management Studio and connect to the relevant instance.
  2. In Object Explorer, right-click a server and select Properties.
  3. Click the Memory node.
  4. Under Server Memory Options, enter the same amount that you want for Minimum server memory and Maximum server memory.
  5. Use the default settings to allow SQL Server to change its memory requirements dynamically based on available system resources. It is recommended to set a max server memory as detailed above.

Additional Information

Effects of min and max server memory: https://technet.microsoft.com/en-us/library/ms180797(v=sql.105).aspx
FIX: Performance problems occur when database lock activity increases in SQL Server: https://support.microsoft.com/en-in/help/2926217/fix-performance-problems-occur-when-database-lock-activity-increases-i
Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Nov 15, 2018 07:42 PM
Updated by: