How to reinstall MS DTC on windows server 2003 R2

5月14日

How to reinstall MS DTC on windows server 2003 R2

How to reinstall MS DTC on windows server 2003 R2
 
Event Type: Error
Event Source: MSDTC
Event Category: SVC
Event ID: 4112
Date:  2006-6-5
Time:  1:46:03
User:  N/A
Computer: WIN2003R2
Description:
Could not start the MS DTC Transaction Manager.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Event Type: Error
Event Source: Service Control Manager
Event Category: None
Event ID: 7024
Date:  2006-6-5
Time:  1:44:04
User:  N/A
Computer: WIN2003R2
Description:
The Distributed Transaction Coordinator service terminated with service-specific error 3221229584 (0xC0001010).
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
開始吧
setp 1 停止相關服務
MSDTC_1.bat
@echo off
if {%1}=={} @echo Syntax: MSDTC1 Filename&goto :EOF
setlocal ENABLEDELAYEDEXPANSION
set filename=%1
if exist %filename% del /q %filename%
(
@echo Alerter
@echo EventSystem
@echo Browser
@echo TrkWks
@echo Dnscache
@echo Eventlog
@echo PolicyAgent
@echo dmserver
@echo Messenger
@echo Netlogon
@echo NtLmSsp
@echo Netman
@echo PlugPlay
@echo RpcSs
@echo RpcLocator
@echo NtmsSvc
@echo SamSs
@echo lanmanserver
@echo SENS
@echo Schedule
@echo LmHosts
@echo winmgmt
@echo Wmi
@echo W32Time
@echo lanmanworkstation
)>"%TEMP%\MSDTC1.TMP"
call :stopdtc>nul 2>&1
for /f "Tokens=*" %%L in ('reg query HKLM\System\CurrentControlSet\Services^|FINDSTR /I /B /L /C:"HKEY_LOCAL_MACHINE"') do (
 set line=%%L
 set key=HKLM!LINE:~18!
 call :subkey "!key!"
 call :testsvc
)
endlocal
goto :EOF
:stopdtc
sc stop msdtc
goto :EOF
:testsvc
for /f "Tokens=*" %%c in (
'@echo !svc!^|findstr /I /B /E /L /G:"%TEMP%\MSDTC1.TMP"') do goto :EOF
set /a start=3
set /a type=0
call :getstart>nul 2>&1
call :gettype>nul 2>&1
if %type% LSS 16 goto :EOF
if %start% NEQ 2 goto :EOF
sc config !svc! start= demand
@echo sc config !svc! start= auto>>%filename%
goto :EOF
:gettype
for /f "Tokens=2,3" %%x in ('reg query "HKLM\System\CurrentControlSet\Services\!svc!" /V type^|FIND "REG_DWORD"') do (
 set /a type=%%y
)
goto :EOF
:getstart
for /f "Tokens=2,3" %%x in ('reg query "HKLM\System\CurrentControlSet\Services\!svc!" /V start^|FIND "REG_DWORD"') do (
 set /a start=%%y
)
goto :EOF
:subkey
set svc=%~nx1
重啓機器
step 2 刪除關聯的註冊表項及重新安裝msdtc組件
MSDTC_2.bat
@echo off
setlocal
@echo %WINDIR%\System32\msdtc.exe -uninstall
%WINDIR%\System32\msdtc.exe -uninstall
call :delkey "HKCR\CID"
call :delkey "HKLM\SYSTEM\CurrentControlSet\Services\MSDTC"
call :delkey "HKLM\SYSTEM\ControlSet001\Services\MSDTC"
call :delkey "HKLM\SYSTEM\ControlSet002\Services\MSDTC"
call :delkey "HKLM\Software\Microsoft\MSDTC"
@echo %WINDIR%\System32\msdtc.exe -install
%WINDIR%\System32\msdtc.exe -install
endlocal
goto :EOF
:delkey
set key=%1
call :delkeyq %key% >nul 2>&1
@echo.
goto :EOF
:delkeyq
REG DELETE %key% /F
step 3 restlog
MSDTC_3.bat
@echo off
if {%1}=={} @echo Syntax: MSDTC3 Filename&goto :EOF
if not exist %1 Syntax: MSDTC3 Filename - %1 was NOT found.&goto :EOF
setlocal
set filename=%1
for /f "Tokens=*" %%r in ('type %filename%') do (
 %%r
)
reg add "HKLM\SOFTWARE\Microsoft\MSDTC\XADLL" /F
regsvr32 mtxoci.dll
endlocal
OK 了,看看日誌
Event Type: Information
Event Source: MSDTC
Event Category: SVC
Event ID: 4104
Date:  2006-6-5
Time:  2:11:33
User:  N/A
Computer: WIN2003R2
Description:
The Microsoft Distributed Transaction Coordinator service was successfully installed.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Event Type: Information
Event Source: LoadPerf
Event Category: None
Event ID: 1000
Date:  2006-6-5
Time:  2:15:46
User:  N/A
Computer: WIN2003R2
Description:
Performance counters for the WmiApRpl (WmiApRpl) service were loaded successfully. The Record Data contains the new index values assigned to this service.
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: ba 16 00 00 be 16 00 00   º...¾...
0008: bb 16 00 00 bf 16 00 00   »...¿...
Event Type: Information
Event Source: MSDTC
Event Category: TM
Event ID: 4193
Date:  2006-6-5
Time:  2:12:48
User:  N/A
Computer: WIN2003R2
Description:
MS DTC started with the following settings (OFF = 0 and ON = 1):
  Security Configuration:
      Network Administration of Transactions = 0,
      Network Clients = 0,
      Inbound Distributed Transactions using Native MSDTC Protocol = 0,
      Outbound Distributed Transactions using Native MSDTC Protocol = 0,
      Transaction Internet Protocol (TIP) = 0,
      XA Transactions = 0
  Filtering Duplicate events = 1
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
UPDATE:
1、升級、遷移比重構難,需要考慮相當周全。網絡結構、平臺應用等同樣如此
2、搞定一個問題比重裝OS  更有價值。時間允許下2說
3、不要動不動就這個體系,那個構建有問題.....任何東西都存在的意義。程序員很偉大
4、不要在正式運行的服務器上亂搞
5、別拿你的脾氣挑戰別人的專業
6、Google很好,不用會死?

0

收藏

黑鍋

25篇文章,4W+人氣,0粉絲

Ctrl+Enter 發佈

發佈

取消

掃一掃,領取大禮包

0

分享
黑鍋
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章