SQL Server Performance

Executed as user: DomainNameSQLService. 223389 [SQLSTATE 01000] (Message 0) MSDTC on server 'ServernameInstance' is unavailable. [SQLSTATE 42000] (Er

Discussion in 'SQL Server 2008 General DBA Questions' started by raagi2000, Apr 11, 2011.

  1. raagi2000 New Member

    it is clustered 3 node .. I am running the below within proc on the node where currently MSDTC is running (SQL2k8 sp1 64bit). Question
    1. Why is it looking for distributed transaction is that becauase of linked server.. i am not using begin distributed or anything like that...
    2. why we getting msdtc unavailable eventhough running on the node where msdtc currently running.i am running the below statements. if i try to run on other node it does not work at all.
    please throw me some light on this..
    BEGIN TRY

    BEGIN TRANSACTION; -- Start the transaction

    SET @CRMAFSLoanID = NEWID();

    INSERT INTO linkedservername,dbname.dbo.table_name1
    -----
    VALUES
    (@CRMAFSLoanID
    -----

    INSERT INTO [linkedservername,dbname.dbo.table_name2
    -----
    SELECT @CRMAFSLoanID,
    ---
    FROM
    dbname.dbo.tablename3 AS Loan
    WHERE ID = <id>


    END TRY
    BEGIN CATCH
    ROLLBACK TRANSACTION;

    -- Raise an error with the details of the exception
    DECLARE @ErrMsg nvarchar(4000), @ErrSeverity int
    SELECT @ErrMsg = ERROR_MESSAGE(), @ErrSeverity = ERROR_SEVERITY()

    RAISERROR(@ErrMsg, @ErrSeverity, 1)
    END CATCH


    END
  2. satya Moderator

  3. Jahanzaib Member

    you are using Distributed Transaction
    Insert into
    Select from
    that is also a 2 phase commit process

Share This Page