SQL Server 阻止了对组件“Ad Hoc Distributed Queries”的 STATEMENT“OpenRowset/OpenDatasource”的访问
开启组件:
exec sp_configure 'show advanced options',1 reconfigure exec sp_configure 'Ad Hoc Distributed Queries',1 reconfigure
关闭组件:
exec sp_configure 'Ad Hoc Distributed Queries',0 reconfigure exec sp_configure 'show advanced options',0 reconfigure
--导入用户信息
truncate table dbo.CustomerInfo
insert into RedPacket.dbo.CustomerInfo
select * from opendatasource('sqloledb','server=xxx.14.xxx.xxx;uid=sa;pwd=123;database=ma').ma.dbo.CustomerInfo