眼镜:
什么工作:
它驻留在同一服务器上的目录中。
SELECT * FROM OPENQUERY(LINKEDHELL, 'SELECT * FROM [D:\path\mordor.mdb].Orcs')
什么不起作用:
我创建了一个数据库,它公开了一个包含 openquery 表达式的 View 。这使我的应用程序可以忽略它通过链接服务器连接进行查询的事实,并允许我使用 ORM。举个例子: Entity Framework 。
然而,虽然检索数据有效,但更新/插入/删除不会。
我花了很多时间来确保 MSDTC 配置正确,但没有骰子。
我试过的
MSDTC
其他
我得到的错误:
OLE DB provider "MSDASQL" for linked server "LINKEDHELL" returned message "[Microsoft][ODBC Microsoft Access Driver]Invalid attribute/option identifier ".
Msg 7391, Level 16, State 2, Line 4
The operation could not be performed because OLE DB provider "MSDASQL" for linked server "LINKEDHELL" was unable to begin a distributed transaction.
我可以通过从 Sql Management Studio 执行此操作来简单地重新创建它
begin distributed transaction
//anything that queries the linked server
commit transaction
那么我错过了什么?
我读过 ODBC 驱动程序支持分布式事务,但我不确定 ACCESS 数据库是否支持。因此,如果有人至少可以确认这一点。那会有所帮助。
最佳答案
Access doesn't have transactions, because Access is not a database engine. Jet/ACE (Access's default db engine) has supported commit/rollback as long as I've used it (since Jet 2.x, e.g., 1996). It has never supported transaction logging and probably never will (I recognize that's not what you're asking about but many of those coming to Jet/ACE from server database backgrounds are rather foggy on the meaning of the term "transactions" and have a hard time grasping that Jet/ACE supports one and not the other). – David-W-Fenton Jan 16 '10 at 23:12
-- Do we have transactions in MS-Access?
David W Fenton, MVP, RIP
关于sql-server-2008 - 无法开始分布式事务 : Linked Server -> Access database,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11575530/