zoukankan      html  css  js  c++  java
  • SQL Server 2005: how to add a linked server

    SQL Server 2005: how to add a linked server

     

     

    A linked server is a virtual server that has been defined to SQL Server 2005 with all the information required to access an OLE DB data source. A linked server name is defined by using the sp_addlinkedserver system stored procedure.

    EXEC sp_addlinkedserver

           @server=’SERVER_NAME’

           @srvproduct=’’

           @provider=’SQLNCLI’

           @datasrc=’SERVER_NAME’

     

    Local SQL Server logins are mapped to logins in the linked server by using sp_addlinkedsrvlogin.

    The SQL Script below connects a specific login to the linked server by using different user credentials

    EXEC sp_addlinkedsrvlogin 'REMOTE_SERVER_NAME', 'false', 'LOCAL USERID', 'REMOTE USERID', 'REMOTE PASSWORD'

     

    The sp_serveroption system stored procedure is used to set server options for remote servers and linked servers. The SQL script below enables a linked server for distributed query access, which can be used only for sys.server entries added through sp_addlinkedserver.

    EXEC sp_serveroption ‘REMOTE_SERVER_NAME’, ‘data access’, ‘true’

     

    sp_linkedservers
     -- Returns the list of linked servers defined in the local server.


    Reference:

    1. SQL SERVER 2005 BOOKS ONLINE

     

     

  • 相关阅读:
    Python-Re正则表达式库
    杂记
    Python 信息提取-beautifulsoup实例
    Python 中国大学排名定向爬虫
    matlab-汉字unicode编码转换
    Python-beautifulsoup库
    python 安装resquest
    python--数字灯管
    Python time库
    Python random库
  • 原文地址:https://www.cnblogs.com/rickie/p/797580.html
Copyright © 2011-2022 走看看