Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Configuring a linked Server Expand / Collapse
Author
Message
Posted Monday, August 17, 2009 10:58 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, May 5, 2014 8:24 AM
Points: 133, Visits: 617
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?
Post #772108
Posted Monday, August 17, 2009 11:53 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, February 18, 2014 12:52 PM
Points: 502, Visits: 750
You should have MSDTC setup on the boxes, also look at EXACT ON


Post #772138
Posted Monday, August 17, 2009 2:47 PM
Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: 2 days ago @ 4:12 PM
Points: 3,475, Visits: 582
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 Varshal

Post #772280
Posted Wednesday, August 19, 2009 6:33 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, May 22, 2014 7:04 AM
Points: 1,688, Visits: 8,766
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
Post #773968
Posted Monday, August 31, 2009 8:58 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, May 5, 2014 8:24 AM
Points: 133, Visits: 617
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
Post #779948
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse