Distributed Query Error

  • I have set up a linked server between two sql servers (both with SQL 2k/sp 3a). When I issue a distributed query using the four part name, I get this error

    Server: Msg 7391, Level 16, State 1, Line 7

    The operation could not be performed because the OLE DB provider 'SQLOLEDB' was unable to begin a distributed transaction.

    [OLE/DB provider returned message: New transaction cannot enlist in the specified transaction coordinator. ]

    OLE DB error trace [OLE/DB Provider 'SQLOLEDB' ITransactionJoin::JoinTransaction returned 0x8004d00a].

    Any suggestions? Help please. Thanks

  • 1. Check this link

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/trblsql/tr_reslsyserr_2_90hl.asp

     

    2. Make sure MSDTC service is running.


    Joseph

  • Yes I have MSDTC running and after reading the article in the link I am issusing a dbcc command not a DML statement against the Linked Server. Look at sample code below, may that will help.

    Sample Code:

    create table #logspace

    (

      [Database Name]        varchar(100),

      [Log Size (MB)]          decimal(8,4),

      [Log Space Used (%)] decimal(6,2),

      Status                      integer

    )

    Insert Into #logspace exec LinkedServer1.master.dbo.sp_executesql N'dbcc sqlperf(logspace) with tableresults'

    When I execute just this statement

    exec LinkedServer1.master.dbo.sp_executesql N'dbcc sqlperf(logspace) with tableresults'

    I don't get the error message but when i issue it with the insert statement, that is when the error message comes up. Help please. Thanks

  • I ran your code on several test machines but could not replicate the error.  Could you confirm how you are executing the code? QA or a stored procedure?


    Joseph

  • I am running the code in QA currently but if it works i will place it in an SP.

  • Check this link and see if any of the suggestions is helpful.

    http://dbforums.com/arch/175/2002/12/361216


    Joseph

Viewing 6 posts - 1 through 5 (of 5 total)

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