简体   繁体   English

无法在链接服务器OLE DB提供程序“MSDASQL”上更新表

[英]Could not UPDATE table on a Linked Server OLE DB provider “MSDASQL”

Im trying to execute the following simple statement on my Linked Server(HANA Based) in SQL Server: 我试图在SQL Server中的链接服务器(基于HANA)上执行以下简单语句:

UPDATE HANASERVER.."SAP_WORKSHOP"."CUSTOMER"
 SET "CUSTOMER_ID"='3' 
WHERE "CUSTOMER_NAME"='John'

Unfortunately the server retrieve the following error message, denying the transaction: 不幸的是,服务器检索以下错误消息,拒绝该事务:

 The OLE DB provider "MSDASQL" for linked server "HANASERVER" could not UPDATE table "[HANASERVER]..[SAP_WORKSHOP].[CUSTOMER]" 

The SELECT * is doable, so the connection is tested and working. SELECT *是可行的,因此连接已经过测试和运行。

Anyone knows any workaroud for this issues? 有谁知道这个问题的任何工作?

Thank you, Luigi 谢谢你,路易吉

EDIT : I forgot to tell that im using the server as SYSTEM User, so I literally have the permission for doing everything on it, but unfortunately still not working. 编辑:我忘了告诉我使用服务器作为系统用户,所以我真的有权在其上做一切,但遗憾的是仍然没有工作。

EDIT : I defined the Linked Server following the procedure below : 编辑:我按照以下步骤定义了链接服务器:

EXEC sp_addlinkedserver 
@server = 'HANASERVER', --description
@srvproduct = 'HANA_TEST',  --description
@provider = 'MSDASQL',  --Microsoft's OLE DB provider (FIXED NAME)
@datasrc = 'HANA_TEST'  --ODBC System DSN (OUR CONFIGURED SYSTEM DSN)

EXEC sp_addlinkedsrvlogin   
@useself= 'FALSE',  
@rmtsrvname = 'HANASERVER', --description
@locallogin = NULL, 
@rmtuser = 'SYSTEM',    --HANA User
@rmtpassword = 'XXXXXXXX'   --HANA Pswd

EDIT: I'm currently using SSMS on the remote server where the system and the linked server are on. 编辑:我目前正在系统和链接服务器所在的远程服务器上使用SSMS。 But still can't resolve the issue. 但仍无法解决问题。 I'm trying to exec the query from the query window. 我正在尝试从查询窗口执行查询。 :) :)

Try using this syntax if you verified that the user specified for the linked server definition has appropriate permissions to UPDATE the table: 如果验证为链接服务器定义指定的用户具有更新表的适当权限,请尝试使用此语法:

update [linked-server].dbname.dbo.tablename
...
where
...

Also try updating as below, specifically the @provider option: 还尝试更新如下,特别是@provider选项:

EXEC sp_addlinkedserver     
   @server=N'S1_instance1',   
   @srvproduct=N'',  
   @provider=N'SQLNCLI',   
   @datasrc=N'S1\instance1'; 

MSDN LINKED SERVER SPEC MSDN链接服务器规范

UPDATED 更新

Check for TCP/IP and Named Pipes protocols and port. 检查TCP / IP和命名管道协议和端口。 Open SQL Server Configuration Manager and check the SQL Server Network Configuration protocols. 打开SQL Server配置管理器并检查SQL Server网络配置协议。 You should enable Named Pipes and TCP/IP protocol. 您应该启用命名管道和TCP / IP协议。

I think I forgot the login piece: 我想我忘记了登录件:

EXEC master.dbo.sp_addlinkedserver @server = N'SQL1', @srvproduct=N'SQL Server'

EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'SQL1',@useself=N'False',@locallogin=NULL,@rmtuser=N'linkeduser',@rmtpassword='########'

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 链接服务器“(null)”的OLE DB提供程序“ MSDASQL”报告错误 - The OLE DB provider “MSDASQL” for linked server “(null)” reported an error 链接服务器的 SQL Server OPENROWSET OLE DB 提供程序“MSDASQL”“(空)” - SQL Server OPENROWSET OLE DB provider “MSDASQL” for linked server “(null)” 无法从链接服务器的OLE DB提供程序“ MSDASQL”获取列“ [MSDASQL] .LONG_DESCRIPTION”的当前行值:-NETSUITE - Cannot get the current row value of column “[MSDASQL].LONG_DESCRIPTION” from OLE DB provider “MSDASQL” for linked server :--NETSUITE 链接服务器:无法获取 OLE DB 提供程序“MSDASQL”的架构行集“DBSCHEMA_INDEXES” - Linked Server: Cannot obtain the schema rowset "DBSCHEMA_INDEXES" for OLE DB provider "MSDASQL" 链接服务器“(null)”的OLE DB提供程序“MSDASQL”报告错误。 提供商未提供有关错误的任何信息 - The OLE DB provider “MSDASQL” for linked server “(null)” reported an error. The provider did not give any information about the error 错误:“OLE DB提供程序”MSDASQL“用于链接服务器”(null)“返回消息”[Microsoft] [ODBC驱动程序管理器]未找到数据源名称...“ - Error: “OLE DB provider ”MSDASQL“ for linked server ”(null)“ returned message ”[Microsoft][ODBC Driver Manager] Data source name not found …" 无法执行操作,因为链接服务器的 ole db 提供程序“msoledbsql”无法开始分布式事务 - the operation could not be performed because ole db provider "msoledbsql" for linked server was unable to begin a distributed transaction 链接服务器链接服务器的OLE DB提供程序“ SQLNCLI11” - linked server OLE DB provider “SQLNCLI11” for linked server 无法执行该操作,因为链接服务器的 OLE DB 提供程序“SQLNCLI11”无法开始分布式事务 - The operation could not be performed because OLE DB provider "SQLNCLI11" for linked server was unable to begin a distributed transaction 消息7391无法执行此操作,因为链接服务器的OLE DB提供程序无法开始分布式事务 - Msg 7391 The operation could not be performed because OLE DB provider for linked server was unable to begin a distributed transaction
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM