exec sp_dropserver 'ITSV', 'droplogins ' 以后不再使用时删除链接服务器
exec sp_addlinkedserver 'ITSV', ' ', 'SQLOLEDB ', '10.10.0.164'
exec sp_addlinkedsrvlogin 'ITSV', 'false ',null, 'sa', 'xxzgs!@63918227.' 创建链接服务器
select * from ITSV.shxshbz2019.dbo.a_news 查询服务器数据库导入的数据
insert openquery(ITSV, 'SELECT [bt0] ,[bt0color] ,[bt1]
,[bt2]
,[bt3]
,[author]
,[content]
,[newsurl]
,[newsly]
,[newstime]
,[newsaut]
,[channelma]
,[pubchannel]
,[newslevel]
,[pubtop]
,[pubcheck]
,[click]
,[newssort]
,[keyword] FROM shxshbz2019.dbo.a_news ')
select
[bt0]
,[bt0color]
,[bt1]
,[bt2]
,[bt3]
,[author]
,[content]
,[newsurl]
,[newsly]
,[newstime]
,[newsaut]
,[channelma]
,[pubchannel]
,[newslevel]
,[pubtop]
,[pubcheck]
,[click]
,[newssort]
,[keyword] from a_news where pubchannel in('100625,','100370,') order by newstime desc 把本地表导入远程表