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人
了这篇文章
类别: Windows┆阅读( 0)┆评论( 0) ┆ 返回博主首页┆ 返回博客首页
上一篇 Get MailStore Size Exchange 2007 下一篇 How to Join a Windows Media Center PC to a ..

职位推荐

  • CDN运维工程师
  • 网络工程师
  • 运维开发工程师
  • 系统工程师(上海)
  • 初级运维工程师
  • 高级网络运维工程师
  • 市场助理
  • 存储运维主管工程师
  • 网络运维工程师
  • 运维工程师

文章评论

 
 

发表评论            

昵  称:
登录  快速注册
验证码:

点击图片可刷新验证码请点击后输入验证码博客过2级,无需填写验证码

内  容:

同时赞一个

每日博报 精彩不止一点关闭

你可能感兴趣的:(职场,休闲)