November 17, 2009 at 5:07 am
Hi,
I run distributed transaction.
Server1-SP1 (SP-->Stored Procedure) starts transaction and calls Server2-SP2.
In Server2-SP2, it causes error 'string or binary data would be truncated' and that in turn raises above error.
Though I had written SP2 code in TRY....CATCH and SP1 code (which calls SP2) in TRY....CATCH, it does not get catched anywhere because the said error terminates the batch (the SP1 calling batch).
What I need is some sort of exception handling in SP2 (or SP1) so that I can catch the exception and pass/log proper message to caller of SP1.
Any help would be appreciated...
-Mahesh
November 17, 2009 at 6:03 am
can u tell me what exactly SP1 & SP2 do?
as this error is related to data type size exeeds the limit.
i.e if u r inserting data from remote server to local server then any of the column data type size is less than the value u r supplying.
Sanket Ahir
Don't run behind the success, Try to be eligible & success will run behind u......
November 17, 2009 at 9:22 pm
The real issue is not the error 'string or binary data would be truncated'. That I got and solved.
The real issue is when such kind of error occurs, DTS throws exception and terminates batch immediately with error 'The microsoft distributed transaction (MS DTC) has canceled the distributed transaction'.
What I need is catch the real exception and handle it in proper way.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply