EXEC sp_configure 'show advanced options',1
GO
RECONFIGURE GO
EXEC sp_configure 'Ad Hoc Distributed Queries', 1
GO
RECONFIGURE GO
RECONFIGURE
insert into OPENDATASOURCE(
'SQLOLEDB',
'Data Source=192.168.0.208;User ID=sa;Password=soft'
).zjg_ol_con.dbo.v_ep_news(class_id
,news_title
,ins_datetime
,edi_datetime
,news_content)
select class_id
,news_title
,ins_datetime
,edi_datetime
,news_content
from v_ep_news
-- 192.168.0.208的zjg_ol_con.dbo.v_ep_news表必须创建好