When developing distributed database software, I often encounter the following error:
Server: Msg 7391, Level 16, State 1, Line 6
The operation could not be performed because the OLE DB provider 'SQLOLEDB' could not be started. Divide
distributed transactions.
[OLE/DB provider returned message: Unable to
obtain a new transaction in the specified transaction processor. ]
----------------------------------------
Server: Msg 8520, Level 20, State 1, Line 8
Commit of internal MSDTC transaction failed: Result Code = 0x8004d019.
Connection interrupted
----------------------------------------
After searching for solutions to similar problems on the Internet, the following method is recommended (Method 1):
1. Run regedt32 and browse to HKEY_LOCAL_MACHINE oftwareMicrosoftMSDTC.
Add a DWORD value TurnOffRpcSecurity with value data 1.
2. Restart the MS DTC service.
3. Open "Component Services" of "Management Tools".
a. Browse to "Startup Manager".
b. Select "Component Services".
c. Expand the "Component Services" tree, and then expand "My Computer".
d. Right-click "My Computer" and select "Properties".
In the MSDTC tab, make sure the following options are selected:
Network DTC Access Network Management Network Transaction XA Transaction
In addition, the "DTC Login Account" must be set to "NT Authority Network Service". 4. Restart the MS DTC service.
5. Run regedt32 again, browse to HKEY_LOCAL_MACHINE oftwareMicrosoftMSDTC, and then delete the TurnOffRpcSecurity item.
But in fact, this method basically cannot solve the problem. After a long period of repeated practice, I finally solved it according to the following method:
(Method 2)
1. Follow the method of Method 1. If it doesn’t work, continue with the following method
2. Install windows 2003 sp1. After installation, the setting dialog box in step 4 of method 1 is different from the original one. Select "Do not require authentication" in "Transaction Management Communication" ”
3. It is best to install MDAC2.8
3. Through search, find the file named “hosts” (without extension) in C:, usually the path is C:WINDOWSsystem32driversetc, and change the IP address of the other party’s server. Corresponding to the computer, the reference is as follows:
========================================== =
# Copyright (c) 1993-1999 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# www.knowsky.com
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should