/*添加服务器*/
EXEC sp_addlinkedserver
@server = 'hang', /*此名字可以随便取*/
@srvproduct = 'SQL',
@provider = 'SQLOLEDB',
@datasrc = 'IP' /*说明:另外一台服务器的IP*/
go
EXEC sp_addlinkedsrvlogin
@rmtsrvname ='hang', /*需要跟前面连接的同一个名字*/
@useself = 'false',
@locallogin = 'sa',
@rmtuser = 'sa',
@rmtpassword = '******' /*登陆密码*/
insert into GetTB.dbo.GetTB_User
select MacNO,UserNO后面字段略.... from hang.GetTB.dbo.GetTB_User where ID=4119