Home > Database > Mysql Tutorial > body text

SQLServer添加链接服务器

WBOY
Release: 2016-06-07 14:57:07
Original
1747 people have browsed it

无详细内容 无 --启用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

SQLServer添加链接服务器 SQLServer添加链接服务器
--启用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

Copy after login
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template