SQL 服务器链接服务器连接随机获得 "stuck"

SQL Server Linked Server connection gets "stuck" randomly

我有一个 Access DB,我使用 Microsoft Office 12.0 Access 数据库引擎 OLE DB 提供程序连接到 SQL Server 2012 (v11.0.7507) 作为链接服务器。

连接通常工作正常,但有 2 个自动化作业 push/pull 数据和更新 Access DB 中的一些其他数据,有时(不经常但有时)在连接时“卡住”到访问数据库。 SQL 服务器中的会话可见但无法终止 - 或者实际上当我尝试终止它时它卡在 KILLED/ROLLBACK 状态。

没有 MSACCESS.EXE 在任务列表中打开,但是管理工具的打开文件部分确实显示了 SQL 代理打开的 accdb(和 laccdb)文件。不幸的是,关闭它们并没有解决问题,accdb 和 laccdb 文件仍然被锁定。

唯一的解决方案是重新启动 SQL 服务器,然后删除 laccdb 文件,但这不是一个很舒服的解决方案。

我尝试搜索类似的问题,但到目前为止没有找到可行的解决方案。主要问题是(看似)随机性。 大家有没有经历过类似的事情?您知道此设置可能有什么问题吗?

非常感谢。

Access OleDb 提供程序在无人值守的应用程序中的支持非常有限,永远不应在长期应用程序中加载。请参阅 download site 上的注释:

The Office System Drivers are only supported under certain scenarios, including:

  1. Desktop applications which read from and write to various files formats including Microsoft Office Access, Microsoft Office Excel and text files.
  2. To transfer data between supported file formats and a database repository, such as SQL Server. For example, to transfer data from an Excel workbook into SQL Server using the SQL Server Import and Export Wizard or SQL Server Integration Services (provided the SSIS jobs run in the context of a logged-on user with a valid HKEY_CURRENT_USER registry hive).

尝试使用单独的短期进程而不是链接服务器。 SSIS 包是常见的选择。