Home >Database >Mysql Tutorial >使用链接服务器执行远程数据库上的存储过程_MySQL

使用链接服务器执行远程数据库上的存储过程_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-01 14:05:421529browse

--创建链接服务器
exec sp_addlinkedserver 'srv_lnk','','SQLOLEDB','远程服务器名或ip地址'
exec sp_addlinkedsrvlogin 'srv_lnk','false',null,'用户名','密码'
exec sp_serveroption 'srv_lnk','rpc out','true' --这个允许调用链接服务器上的存储过程
go

declare @id int
exec srv_lnk.qsoft2.dbo.ins 'people','mobile','13598136858',@id=@id output

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn