I am trying to do operation on my linked server. I have created one linked server and everything is ok. I just observed one thing which I am not able to understand.
if I run:
update SERVER.testdb.[AAA].MyTable
set MyName = '[email protected]'
where ID = 999
This works fine. But when I execute the same code in following way:
BEGIN TRY
BEGIN TRANSACTION TRF
update SERVER.testdb.[AAA].MyTable
set MyName = '[email protected]'
where ID = 999
END TRY
BEGIN CATCH
ROLLBACK TRANSACTION TRF
END CATCH
It says that the parameter is incorrect.
Can anyone tell me why this is happening and what is solution ?