当前位置: 首页 > news >正文

how to reinstall MS DTC on windows server 2003 R2

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很好,不用会死?

相关文章:

  • java linkedlist源码_深入分析java集合类LinkedList(源码分析)
  • 从诚恳出发,迈向自我实现
  • java 中的map_浅谈java中Map的用法
  • 学习SWT的一些资源
  • java http同步请求_java websocket 如何实现消息同步返回,类似 http 请求数据返回结果...
  • 一条路给出了道题:“还有一元钱去了哪里???”
  • java atm项目_java实现ATM取款项目
  • pyhon使用http代理服务器和POP3、SMTP邮件服务器
  • ubuntu server安装php mysql_Ubuntu杂记——Apache+PHP+MySQL的安装
  • 基于TCP/IP的手机聊天游戏(附带源码和解释)之共享类
  • java杰森_杰森 - BlogJava
  • 基于TCP/IP的手机聊天游戏(附带源码和解释)之服务器端类
  • java显示图片缩略图_java中生成图片的缩略图
  • 基于TCP/IP的手机聊天游戏(附带源码和解释)之客户端类
  • 在DataGrid等控件中添加自动编号的列
  • 【译】JS基础算法脚本:字符串结尾
  • 【Under-the-hood-ReactJS-Part0】React源码解读
  • 【vuex入门系列02】mutation接收单个参数和多个参数
  • 【翻译】Mashape是如何管理15000个API和微服务的(三)
  • 【跃迁之路】【641天】程序员高效学习方法论探索系列(实验阶段398-2018.11.14)...
  • CNN 在图像分割中的简史:从 R-CNN 到 Mask R-CNN
  • Codepen 每日精选(2018-3-25)
  • exports和module.exports
  • happypack两次报错的问题
  • JavaScript类型识别
  • javascript数组去重/查找/插入/删除
  • JDK 6和JDK 7中的substring()方法
  • js作用域和this的理解
  • learning koa2.x
  • MySQL主从复制读写分离及奇怪的问题
  • orm2 中文文档 3.1 模型属性
  • PAT A1092
  • Spring框架之我见(三)——IOC、AOP
  • 从 Android Sample ApiDemos 中学习 android.animation API 的用法
  • 前端技术周刊 2018-12-10:前端自动化测试
  • 小李飞刀:SQL题目刷起来!
  • # 再次尝试 连接失败_无线WiFi无法连接到网络怎么办【解决方法】
  • #NOIP 2014#Day.2 T3 解方程
  • ()、[]、{}、(())、[[]]等各种括号的使用
  • (1)bark-ml
  • (PyTorch)TCN和RNN/LSTM/GRU结合实现时间序列预测
  • (翻译)Entity Framework技巧系列之七 - Tip 26 – 28
  • (附源码)springboot高校宿舍交电费系统 毕业设计031552
  • (附源码)springboot教学评价 毕业设计 641310
  • (蓝桥杯每日一题)平方末尾及补充(常用的字符串函数功能)
  • (六)c52学习之旅-独立按键
  • (一)python发送HTTP 请求的两种方式(get和post )
  • (已解决)什么是vue导航守卫
  • (转) ns2/nam与nam实现相关的文件
  • (转)【Hibernate总结系列】使用举例
  • (转)我也是一只IT小小鸟
  • **python多态
  • .net 4.0发布后不能正常显示图片问题
  • .net core 客户端缓存、服务器端响应缓存、服务器内存缓存
  • .NET Core跨平台微服务学习资源