Configuring a linked Server

  • Hello,

    Continuation from http://www.sqlservercentral.com/Forums/Topic765593-338-1.aspx

    In a nut shell: I want to populate a table with data from another table via linked server.

    My problem is that I can execute a stored procedure alone but not in conjunction with my INSERT.

    Lets say I have storedProc (located on sourceDB) 'spPopulateTableX' which selects a set of data from sourceDB to be inserted in to targetDB.

    On targetDB using Management Studio I can execute the following:

    EXEC spPopulateTableX

    This returns the data no problems.

    BUT if I try and populate my table with this data using:

    INSERT INTO tableX EXEC spPopulateTableX

    I get the following error:

    OLE DB provider "SQLNCLI" for linked server "ServerX" returned message "The partner transaction manager has disabled its support for remote/network transactions.".

    Msg 7391, Level 16, State 2, Line 2

    The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "ServerX" was unable to begin a distributed transaction.

    Any ideas? Could it be a problem with Distributed Transaction Co Ordinater?

  • You should have MSDTC setup on the boxes, also look at EXACT ON

  • I had the same problem with OPENROWSET which is basically a dynamic version of a linked server. OPENROWSET in a stored procedure on one server connected to a number of servers. It worked fine with some servers but was giving me same errors with other servers if Insert was involved. No problems with Select. But as soon as I tried to insert data from other servers into the local table (local to the server where the procedure was working from) I was getting this message about being unable to start the distributed transaction Again, some data servers responded correctly and some with the above error.

    I ended up running the procedure from another computer and it worked with all SQL Servers it tried to connect.

    I did explore all MSDTC settings and could not figure out why I could run this procedure from one computer and can not from another server.

    Regards,Yelena Varsha

  • 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.

    Hope it helps,

    http://social.msdn.microsoft.com/Forums/en-US/adodotnetdataproviders/thread/7172223f-acbe-4472-8cdf-feec80fd2e64

    MJ

  • Hi thanks all for your feedback and Manu for your comprehensive post.

    There is currently no appplication involved, all this happening through Mangement Studio. None the less I suppose it is worth a try.

    Interesting what you say about rebooting the server, will see if it helps.

    G

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply