Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

You may receive a 7391 error message in SQL Server 2000 when you run a distributed transaction against a linked server after you install Windows Server 2003 or Windows XP Service Pack 2


View products that this article applies to.

Symptoms

When you run a distributed transaction against an instance of SQL Server, you may receive an error message that is similar to the following:

Server: Msg 7391, Level 16, State 1, Line 1
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].


This problem may occur when one of following conditions is true:
  • Microsoft Windows Server 2003 or Microsoft Windows XP Service Pack 2 (SP2) is installed on the computer that initiates the distributed transaction.
  • Microsoft Windows Server 2003 or Microsoft Windows XP SP2 is installed on the remote computer that is running Microsoft SQL Server 2000, and that computer is linked to the computer that initiates the distributed transaction.

↑ Back to the top


Cause

This problem occurs because of one or more of the following reasons:
  • Microsoft Distributed Transaction Coordinator (MSDTC) is disabled for network transactions.
  • Windows Firewall is enabled on the computer. By default, Windows Firewall blocks the Microsoft Distributed Transaction Coordinator (MSDTC) program.

    Note This problem may occur even when Windows Firewall is turned off.

↑ Back to the top


Workaround

Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
322756 How to back up and restore the registry in Windows


To work around this problem, follow these steps on the computer that Windows Server 2003 or Windows XP SP2 is installed on:
  1. Make sure that the Log On As account for the MSDTC service is the Network Service account. To do this, follow these steps:
    1. Click Start, and then click Run.
    2. In the Run dialog box, type Services.msc, and then click OK.
    3. In the Services window, locate the Distributed Transaction Coordinator service under Name in the right pane.
    4. Under the Log On As column, see whether the Log On As account is Network Service or Local System.

      If the Log On As account is Network Service, go to step 2. If the Log On As account is Local System account, continue with these steps.
    5. Click Start, and then click Run.
    6. In the Run dialog box, type cmd, and then click OK.
    7. At the command prompt, type Net stop msdtc to stop the MSDTC service.
    8. At the command prompt, type Msdtc �uninstall to remove MSDTC.
    9. At the command prompt, type regedit to open Registry Editor.
    10. In Registry Editor, locate the following key:

      HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC
      registry key.

      Delete this key.
    11. Quit Registry Editor.
    12. At the command prompt, type Msdtc �install to install MSDTC.
    13. At the command prompt, type Net start msdtc to start the MSDTC service.

      Note that the Log On As account for the MSDTC service is set to Network Service account.
  2. Enable MSDTC to allow the network transaction. To do this, follow these steps:
    1. Click Start, and then click Run.
    2. In the Run dialog box, type dcomcnfg.exe, and then click OK.
    3. In the Component Services window, expand Component Services, expand Computers, and then expand My Computer.
    4. Right-click My Computer, and then click Properties.
    5. In the My Computer Properties dialog box, click Security Configuration on the MSDTC tab.
    6. In the Security Configuration dialog box, click to select the Network DTC Access check box.
    7. To allow the distributed transaction to run on this computer from a remote computer, click to select the Allow Inbound check box.
    8. To allow the distributed transaction to run on a remote computer from this computer, click to select the Allow Outbound check box.
    9. Under the Transaction Manager Communication group, click to select the No Authentication Required option. Set No Authentication Required on both the client and the remote systems.
    10. In the Security Configuration dialog box, click OK.
    11. In the My Computer Properties dialog box, click OK.
  3. Configure Windows Firewall to include the MSDTC program and to include port 135 as an exception. To do this, follow these steps:
    1. Click Start, and then click Run.
    2. In the Run dialog box, type Firewall.cpl, and then click OK
    3. In Control Panel, double-click Windows Firewall.
    4. In the Windows Firewall dialog box, click Add Program on the Exceptions tab.
    5. In the Add a Program dialog box, click the Browse button, and then locate the Msdtc.exe file. By default, the file is stored in the <Installation drive>:\Windows\System32 folder.
    6. In the Add a Program dialog box, click OK.
    7. In the Windows Firewall dialog box, click to select the msdtc option in the Programs and Services list.
    8. Click Add Port on the Exceptions tab.
    9. In the Add a Port dialog box, type 135 in the Port number text box, and then click to select the TCP option.
    10. In the Add a Port dialog box, type a name for the exception in the Name text box, and then click OK.
    11. In the Windows Firewall dialog box, select the name that you used for the exception in step j in the Programs and Services list, and then click OK.
  4. Test pinging from the host server to the remote server, and from the remote server to the host server, using the netbios name (server name, without the domain). Microsoft Distributed Transaction Coordinator uses the netbios name, not the fully qualified domain name, to locate servers. If name resolution fails, distributed transactions will fail. If pings using the netbios name fails, refer to the following knowledge base article:
    172218 Microsoft TCP/IP Host Name Resolution Order

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


More information

Steps to reproduce the behavior

  1. Log on to a computer that has Windows Server 2003 or Windows XP SP2 installed.
  2. Start Query Analyzer.
  3. Add a remote computer that is running Microsoft SQL Server 2000 as a linked server. To do this, run the following Transact-SQL statement in Query Analyzer:
    EXEC sp_addlinkedserver  '<remote_server>',  N'SQL SERVER'
    GO

    Note Replace remote_server with the name of the computer that must be configured as the linked server.
  4. Run a distributed transaction between this computer and the remote computer. To do this, run the following Transact-SQL statement in Query Analyzer:
    SET xact_abort ON 
    GO
    USE  pubs
    GO
    BEGIN DISTRIBUTED TRANSACTION
    SELECT  *  FROM <remote_server>.pubs.dbo.authors
    COMMIT TRAN
    GO
    
    You may receive the error message that is mentioned in the "Symptoms" section.

↑ Back to the top


References

For more information about configuring Windows XP Service Pack 2 for use with SQL Server 2000, click the following article number to view the article in the Microsoft Knowledge Base:
841249 How to configure Windows XP Service Pack 2 for use with SQL Server

↑ Back to the top


Keywords: kberrmsg, kbdtc, kbdomain, kbauthentication, kbtransaction, kbrpc, kbprb, kbregistry, KB839279

↑ Back to the top

Article Info
Article ID : 839279
Revision : 4
Created on : 8/25/2009
Published on : 8/25/2009
Exists online : False
Views : 505