zoukankan      html  css  js  c++  java
  • Question about sql server's linked server

    create a linked server:

    EXEC sp_addlinkedserver 'test','','SQLOLEDB','test',null,'driver={sql server};server=ipaddress;uid=sa,pwd=;'

      exec sp_serveroption N'test', N'rpc out', N'true'

      exec sp_serveroption N'test', N'rpc', N'true'

      exec sp_addlinkedsrvlogin 'test','False',null,'sa',''

    we also can add linked server through DB management studio wizard, but you must  execute the command :exec sp_addlinkedsrvlogin 'test','False',null,'sa','' or do it through wizard

    test example:

    select * from test.pubs.dbo.tb_maintab

    error information:

    "The partner transaction manager has disabled its support for remote/network transactions"

    solution:

    First verify the "Distribute Transaction Coordinator" Service is
    running on both database server computer and client computers
    1.      Go to "Administrative Tools > Services"
    2.      Turn on the "Distribute Transaction Coordinator" Service if it is not running
    If it is running and client application is not on the same computer as
    the database server, on the computer running database server
    1.      Go to "Administrative Tools > Component Services"
    2.      On the left navigation tree, go to "Component Services > Computers
    > My Computer" (you may need to double click and wait as some nodes
    need time to expand)
    3.      Right click on "My Computer", select "Properties"
    4.      Select "MSDTC" tab
    5.      Click "Security Configuration"
    6.      Make sure you check "Network DTC Access", "Allow Remote Client",
    "Allow Inbound/Outbound", "Enable TIP" (Some option may not be
    necessary, have a try to get your configuration)
    7.      The service will restart
    8.      BUT YOU MAY NEED TO REBOOT YOUR SERVER IF IT STILL DOESN'T WORK
    (This is the thing drove me crazy before)
    On your client computer use the same above procedure to open the
    "Security Configuration" setting, make sure you check "Network DTC
    Access", "Allow Inbound/Outbound" option, restart service and computer
    if necessary.
    On you SQL server service manager, click "Service" dropdown, select
    "Distribute Transaction Coordinator", it should be also running on
    your server computer.

     

    copy from msdn froum: http://forums.microsoft.com/msdn/showpost.aspx?pos...

  • 相关阅读:
    Mysql 如何设置字段自动获取当前时间
    如何利用OCS缓存TomcatSession全局变量(转)
    CDN技术分享
    怎么在阿里云服务器部署多个tomcat
    nginx模块开发篇 (阿里著作)
    Nginx开发从入门到精通 学习目录分享学习 (阿里著作)
    阿里云 通过YUM源安装nginx
    Java 模板引擎 jetbrick-template
    七天学会NodeJS
    Android开发之蓝牙 --修改本机蓝牙设备的可见性,并扫描周围可用的蓝牙设备
  • 原文地址:https://www.cnblogs.com/skyfei/p/499016.html
Copyright © 2011-2022 走看看