SQL SERVER 2000: MS DTC Problem

  • Actually i'm able to access the data from linked server using select statement in Query Analyzer but when i use the same in

    < Begin Transaction >

    It gives me error

    One week earlier everything was working fine this problem occur only after restart of server ( Environment is Win2k and S2k)


    Vss

  • Can you give more info on when you are getting this error.

    also please check your DTC if it is running.

     

    Regards

    Meghana  


    Regards,

    Meghana

  • MSDTC is almost to call a bug in Windows 2003 in combination with SQL 2000. As much in clustered systems as in stand alone systems.

    What is the problem with MSDTC?

    MSDTC needs to be started before SQL Server 2000 starts on the machine. There is no check and start command in Windows 2003 or SQL Server 2000 wich could take care of this dependency.

    If you run in to this problem:

    1. Stop all of the SQL Server 2000 instances on the machine with the problem.
    2. Reset the MSDTC log by cmd command: msdtc -resetlog
    3. Stop the MSDTC service by cmd command: msdtc -stop
    4. Start the MSDTC service by cmd command: msdtc -start
    5. Start all of the SQL Server 2000 instances on the machine with the problem.

    You can check if it is ok if in the SQL Server 2000 errorlog you will not find the following line:

    Failed to obtain TransactionDispenserInterface: Result Code = 0x8004d01b

    If the problem persists:

    Repeat the steps above and also between step 3 and 4 above:

    • Uninstall the MSDTC service by cmd command: msdtc -uninstall
    • Install the MSDTC service by cmd command: msdtc -install
    • 1 extra resetlog for MSDTC by cmd command: msdtc -resetlog

    If this still does not help, check if the MSDTC service is running under the NT AUTHORITY\NetworkService account and if the MSDTC service is set to automatic starting in the services console on the machine.

    Hope this helps! In my opinion, Microsoft has not done a very well done thinking job on MSDTC in conjunction with SQL Server 2000 and Windows 2003.

     

  • Having trouble with this whole day..

    One moment it works fine, next minute it doesn't! Too weird!

    I have one setup with Win 2000 Server and SQL 2000 and everything works fine.

    Another setup is Win2003 and SQL 2000 and I'm having troubles with this same error. Can't get data from linked server. Well, I can get it when I write query wih openquery, but when I put this into procedure, and make query from string, and then execute through sp_executesql, it just won't work. Sometimes one query works, but other doesn't, sometimes neither one works. I'm feeling kind a crazy..having ghosts in server...

    Tommorrow I'll try your solutin, I'll let you know.

  • Today I'm gettin crazy even more.

    Here's my setup:

    Win 2003 Server

    SQL server 2000

    I'm having linked server to DB2 database, using IBM DB2 ODBC driver.

    Everything works just fine on the other server with Win 2000 Server.

    Here, I have problems.

    When I try to run procedure which is getting data from this linked server, it throws me an error:

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

    [OLE/DB provider returned message: [IBM][CLI Driver] CLI0119E Unexpected system failure. SQLSTATE=58004]

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

    Procedure has two queries getting the data from linked server into temp tables, calculating something, and returning recordset.

    Here's the fun part:

    I take the body of the procedure and run it. It throws the same error.

    I take only the first part of the procedure (first query), run it, same error.

    I remove insert into temp table, IT WORKS.

    I return insert as it was (uncomment), IT WORKS.

    I do the same with the other query, IT WORKS.

    Now the whole procedure body, which is the same as before, works fine!

    Then I copy/paste this body into another window in query analyzer and IT DOESN't WORK!

    When I repeat procedure as before, it works.

    Please help.

  • Do you have the error

    Failed to obtain TransactionDispenserInterface: Result Code = 0x8004d01b

    in the SQL errorlog?

  • No error at all!

  • That case I have no solution for you.

    What platform is the connection to? Unix, AIX, Windows?

  • IBM AS/400

  • I am sorry, but I have no experience with connections to AS/400.

  • Thanky ou anyway

  • Did you ever find a solution for this problem as I am experiencing the same?

    Kind regards

    Chris

     

  • I've had some fun issues with distributed transactions to the AS/400. In my experience, they're not DTC errors, but problems with the IBM AS/400 OLE DB driver.

    Experiment with wrapping the distributed part of the stored proc with BEGIN DISTRIBUTED TRANSACTION ... COMMIT

    So, if you're query from the 400 looks like

    INSERT INTO #Temp

    SELECT * FROM OPENQUERY(...)

    try

    BEGIN DISTRIBUTED TRANSACTION

    INSERT INTO #Temp

    SELECT * FROM OPENQUERY(...)

    COMMIT

    Also, if you're inserting into a # table, try creating a real table and inserting into that.

    If you're doing SELECT * INTO #Table FROM OPENQUERY(...)

    try replacing it with the INSERT INTO... SELECT * FROM structure.

    I've had simmilar errors before, and similar behaviour and it's often a trial and error process to fix it.

    HTH

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Take a look in Evvent viewer.

    I had an error, MSDTC, id 4445. There was a solution

Viewing 14 posts - 1 through 13 (of 13 total)

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