Linked Server + Transaction + Try Catch + Error log

  • Hi All,

    I have a linked server to transport data from SQL2005 to SQL2000.

    When I use a transaction in a try catch block and RAISERROR to log error into windows event log, it throws me an error stated as MSDTC has cancelled the transaction.

    When I dont use the transaction it does not throw me an error and logs the error into event log. But because of this I have to manually rollback transactions in case of errors.

    Is there some better way to achieve this?

    Thanks in Advance...

  • You can use DTCPing from Microsoft to troubleshoot MS-DTC Issues

    Download link

    Once downloaded, then follow this support article to troubleshoot issues.

    Make sure that DTC is running with no issues. (Administrative Tools --> Component Services --> Computer --> Right click My Computer --> Refresh all components should not throw any error)

    Regards,
    Sakthi
    My Blog -> http://www.sqlserverdba.co.cc

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply