【发布时间】:2014-03-03 10:47:30
【问题描述】:
观察到的问题和error message是:
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
环境:Windows server 2003 标准版上的 SQL Server 2005 标准版。在 VM 上虚拟化 - 具有 8 GB RAM 自动应用程序正在处理数据——读取原始数据并将结果写入数据库。这些应用程序收到错误消息并在上面崩溃。 (还安排了数据库备份和索引维护作业。)
在使用 sql server 2005 企业版和 windows 2003 企业版的类似系统上从未观察到相同的错误。
我已经在网上搜索并找到了一些答案。但是例如 SQL Server cannot obtain a LOCK resource at this time - What to do? 对我没有帮助
建议检查一个来源:
SELECT request_session_id, COUNT (*) num_locks
FROM sys.dm_tran_locks
GROUP BY request_session_id
ORDER BY count (*) DESC
一个会话想出了 10 个。
内存和锁定设置都是默认设置。
我目前的想法是清除大部分旧的并且可以删除的数据。
是否有人对如何处理锁资源问题有任何其他想法?它的具体原因是什么? SQL server 标准版是否允许更少的资源 - 问题与 sql server 版本有关吗?如何解决这个问题?
【问题讨论】:
标签: sql sql-server sql-server-2005 database-locking