您的位置:首页 > 其它

how to reinstall MS DTC on windows server 2003 R2铪

2008-04-01 19:45 816 查看
 
A、问题故障
对方反馈
1、升级OS 2003--2003 R2 [ OK]
2、升级DB 2000-2005  [产生问题]
B、问题产生:
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.

C、怎么办?
特定要求不能reinstall OS
查了KB,有用的没几个..............
 开始吧
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很好,不用会死?
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: