select srvname,* from master.dbo.sysservers
//创建linkServer
exec sp_addlinkedserver 'srv_lnk','','SQLOLEDB','服务器名'
//登陆linkServer
exec sp_addlinkedsrvlogin 'srv_lnk','false',null,'用户名','密码'
//查询示例
select * from srv_lnk.数据库名.dbo.表名
2022-01-09 10:38:35