[英]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.