海海日记-冯海滨博客

您现在的位置是:首页 > SQL > 正文

SQL

[MSSQL]开启/关闭Ad Hoc Distributed Queries组件

happyfhb2024-05-15SQL391

SQL Server 阻止了对组件“Ad Hoc Distributed Queries”的 STATEMENT“OpenRowset/OpenDatasource”的访问


开启组件:

exec sp_configure 'show advanced options',1reconfigureexec sp_configure 'Ad Hoc Distributed Queries',1reconfigure


关闭组件:

exec sp_configure 'Ad Hoc Distributed Queries',0reconfigureexec sp_configure 'show advanced options',0reconfigure

--导入用户信息
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


平淡中储蓄成长

发表评论

评论列表

  • 这篇文章还没有收到评论,赶紧来抢沙发吧~