我是SQL Server 2016 (SP2-CU7-GDR)
的最终用户。
我正在尝试执行以下性质的查询:
DECLARE @sqlcode VARCHAR(MAX)
SET @sqlcode = 'proprietary sql code'
TRUNCATE TABLE [wundermahndb].[dbo].[Training]
INSERT INTO [wundermahndb].[dbo].[Training]
exec ( @sqlcode ) at OLAP
我最终遇到的是一个错误:
OLE DB provider "OraOLEDB.Oracle" for linked server "OLAP" returned message "Unable to enlist in the transaction.".
Msg 7391, Level 16, State 2, Line 243
The operation could not be performed because OLE DB provider "OraOLEDB.Oracle" for linked server "OLAP" was unable to begin a distributed transaction.
然后我尝试在查询的顶部添加这两行:
set XACT_ABORT on
EXEC master.dbo.sp_serveroption @server=N'OLAP', @optname=N'rpc out', @optvalue=N'true'
并出现以下错误:
Msg 15247, Level 16, State 1, Procedure sp_serveroption, Line 27 [Batch Start Line 0]
User does not have permission to perform this action.
OLE DB provider "OraOLEDB.Oracle" for linked server "OLAP" returned message "Unable to enlist in the transaction.".
Msg 7391, Level 16, State 2, Line 243
The operation could not be performed because OLE DB provider "OraOLEDB.Oracle" for linked server "OLAP" was unable to begin a distributed transaction.
我引用了this post,但是该解决方案是我上面尝试过的解决方案,显然不起作用。
我也看过:
如何运行此查询?
((注意-我正在使用SSMS 2017)] >>
我是SQL Server 2016(SP2-CU7-GDR)的最终用户。我正在尝试执行以下性质的查询:DECLARE @sqlcode VARCHAR(MAX)SET @sqlcode ='专有sql代码'TRUNCATE TABLE [...
关闭链接服务器的remote proc transaction promotion
option: