Click here to Skip to main content
15,893,790 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

i have used follwing link to tranfer data from different servers.
how to connect different server database tabels[^]

But after i done that i was getting this error:
The operation could not be performed because OLE DB provider "SQLNCLI" for linked server "74.13.0.452" was unable to begin a distributed transaction.
OLE DB provider "SQLNCLI" for linked server "74.13.0.452" returned message "The partner transaction manager has disabled its support for remote/network transactions.".


Then i configured of MS DTC in addmistrative tool then also i'm getting this error which is one above.
please reply with an example.
Posted
Updated 24-Oct-11 3:42am
v2

1 solution

check below

DECLARE @t_Cnt int
SELECT TOP 1 @t_Cnt=1 FROM Master.dbo.sysservers Where Srvname= 'Patron'
IF(@t_Cnt<>1) --No Records Found then Create Link to Server
BEGIN

--Create Link to the another server
EXEC Master.dbo.sp_addlinkedserver
@server = 'MyServer',
@srvproduct = 'sqlserver',
@provider = 'SQLOLEDB',
@datasrc = '12.168.12.9' --MyServer IP Address

--Create Login Credentitals to The MyServer
EXEC Master.dbo.SP_ADDLINKEDSRVLOGIN 'MyServer', 'false', null, 'sa', 'sa'

--Create RPC to Server
EXEC Master.dbo.sp_serveroption @server='MyServer', @optname='rpc', @optvalue='true'
EXEC Master.dbo.sp_serveroption @server='MyServer', @optname='rpc out', @optvalue='true'

END

--to execute procedure
EXEC MyServer.DATABASENAME.dbo.sp_GetSupplyList

--to execute query
SELECT * FROM MyServer.DATABASENAME.dbo.TBL_Test

--Delete the Server link and Login Credentials
--EXEC Master.dbo.sp_dropserver 'MyServer', 'droplogins'
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900