您的位置:首页 > 数据库

SQL跨数据库数据导入实例

2013-11-04 17:36 239 查看
--Step 1:
exec sp_configure 'show advanced options',1
reconfigure
exec sp_configure 'Ad Hoc Distributed Queries',1
reconfigure

--Step 2:
INSERT INTO [***].[dbo].[Gen_Product]
([Insure_ID]
,[ProductType]
,[SubType]
,[MaxDay]
,[Prefix]
,[BasicInd])
select [Insure_ID]
,[ProductType]
,[SubType]
,[MaxDay]
,[Prefix]
,[BasicInd] from
OPENDATASOURCE('SQLOLEDB','Data Source=192.168.203.110;User ID=sa;Password=123').[123_DEV].dbo.[Gen_Product]
GO
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: