OPENDATASOURCE instead of Linked Server

情到浓时终转凉″ 提交于 2019-12-10 11:17:13

问题


I have a situation where a linked server to an access DB is crashing my SQL server.

Crashed here means adding the linked server causes all other linked servers using that provider to stop working. Any queries to those linked servers hang and don't complete. This situation persists until the server is restarted.

However, when I use OPENDATASOURCE to connect to the same data source I don't have this problem.

Why would one work and the other crash?

The provider I'm using is Microsoft.ACE.OLEDB.12.0. I have Dynamic parameter and Allow inprocess enabled. Example query below

select 
*
from OPENDATASOURCE('Microsoft.ACE.OLEDB.12.0', 
    'Data Source=\\networkPath\Reporting.accdb')...MyAccessTable

回答1:


SQL Server is crashing probably because the SQLSERV.EXE Call stack got filled by OLEDB object or because the data access library configuration is not correct.

Try this :

  1. Make sure Allow inprocess option is activated on your provider
  2. Start SQLSERV.EXE with a bigger Call Stack using -g 512 startup parameters



来源:https://stackoverflow.com/questions/19160689/opendatasource-instead-of-linked-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!