Wednesday, March 21, 2012

distibuted transations in linked server

please solve this problem.

when i am executing any transaction from one server to update record in other linked server database.

create PROCEDURE [dbo].[aTest]

@.iNum as int

AS

BEGIN

SET NOCOUNT ON;

begin tran

update aaa set sName='Deepak'

where iNum=@.iNum

exec [REPORTSRVR\SQL2005].HDFCCUSTOMER.dbo.aProc @.iNum

if @.@.error <> 0

begin

rollback tran

return

end

else

begin

commit tran

end

SET NOCOUNT OFF;

END

it shows following error

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

1. Check/change your server option "remote proc trans" via sp_configure or Connections tab in SQL Server Instance Properties window

2. If you need MS DTC for distributed transactions: http://blogs.msdn.com/mab/archive/2005/12/30/508273.aspx

|||

thanks for response.

i m using transaction statement. is it possible that single transaction can talk from two server?

No comments:

Post a Comment