SQLServer添加链接服务器
程序员文章站
2022-03-31 11:58:30
...
无详细内容 无 --启用Ad Hoc Distributed Queries:exec sp_configure 'show advanced options',1 reconfigure exec sp_configure 'Ad Hoc Distributed Queries',1 reconfigure --关闭Ad Hoc Distributed Queries:exec sp_configure 'Ad Hoc Distributed Que
--启用Ad Hoc Distributed Queries: exec sp_configure 'show advanced options',1 reconfigure exec sp_configure 'Ad Hoc Distributed Queries',1 reconfigure --关闭Ad Hoc Distributed Queries: exec sp_configure 'Ad Hoc Distributed Queries',0 reconfigure exec sp_configure 'show advanced options',0 reconfigure --添加服务 exec sp_addlinkedserver '服务器服务名','','SQLOLEDB','服务器服务名' --添加登陆 exec sp_addlinkedsrvlogin '服务器服务名','false',null,'sa','密码' ---启动存储过程 exec sp_serveroption '服务器服务名','rpc out','true' --删除服务和登陆 exec sp_dropserver '服务器服务名','droplogins' Select * From sys.servers Select top 1 * From [服务器服务名].[master].sys.databases