我们当前有一个 2 节点(Win2003)SQL 2005 集群,运行 2 个实例。
我们需要将所有驱动器移动到新的 SAN,但正在考虑如何移动当前正在“记录”Quorum 驱动器的 DTC。
我们如何知道 MSDTC 是否正在使用?日志文件显示日期已超过 2 年,但查看 DTC 服务 - 它已启动。
另外,移动它的最佳方法是什么?我们可以破解注册表来更改对当前驱动器号的任何引用吗?
干杯
答案1
在以前的工作中,我经常需要安装新的集群。因此,我想出了一个命令文件来执行安装。它应该为您提供前进的方向。只需确保更改相关部分(服务器名称、IP 地址、磁盘)。
cluster ClusterName group "MSDTC Group" /create
cluster ClusterName group "MSDTC Group" /setowners:server1,server2
cluster ClusterName res "MSDTC IP Address" /create /group:"MSDTC Group" /type:"IP Address"
cluster ClusterName res "MSDTC IP Address" /priv network=public
cluster ClusterName res "MSDTC IP Address" /priv Address=127.0.0.1
cluster ClusterName res "MSDTC IP Address" /priv SubnetMask=255.255.255.0
cluster ClusterName res "MSDTC Network Name" /create /type:"Network Name" /group:"MSDTC Group"
cluster ClusterName res "MSDTC Network Name" /priv Name=MSDTCClusterName
cluster ClusterName res "MSDTC Network Name" /adddep:"MSDTC IP Address"
cluster ClusterName res "Disk M:\" /move:"MSDTC Group"
cluster ClusterName res "MSDTC Resource" /CREATE /GROUP:"MSDTC Group" /TYPE:"Distributed Transaction Coordinator"
cluster ClusterName res "MSDTC Resource" /ADDDEP:"MSDTC Network Name"
cluster ClusterName res "MSDTC Resource" /ADDDEP:"Disk M:\"
cluster ClusterName res "MSDTC Resource" /ON
答案2
如果未与打开的事务一起使用,您也可以删除之前的 MSDTC 群集资源并创建一个新的。一旦创建了新的磁盘依赖项,它将在首次启动时在新磁盘中创建其 \MSDTC 子文件夹。
带有 MSDTC 和 MSMQ 的 Powershell 示例:
# In MSDTC and MSMQ disks, remove the MSMQ and MSDTC folders to start fresh (after deleting the clustered MSDTC and MSMQ resources)
# Add resources with parameters and dependencies
Add-ClusterResource -name "IP Address 192.168.2.72" -Group "MSMQCluster2" -ResourceType "IP Address"
Get-ClusterResource -Name "IP Address 192.168.2.72" | Set-ClusterParameter -Multiple @{"Address"="192.168.2.72";"Network"="Cluster Network 1";"SubnetMask"="255.255.255.0";EnableNetBIOS=1}
Add-ClusterResource -name "MSMQCluster2" -Group "MSMQCluster2" -ResourceType "Network Name"
Get-ClusterResource -Name "MSMQCluster2" | Set-ClusterParameter -Multiple @{"DnsName"="MSMQCluster2";"PublishPTRRecords"=1}
Set-ClusterResourceDependency -Resource "MSMQCluster2" -Dependency "[IP Address 192.168.2.72]"
Add-ClusterResource -name "MSMQCluster2DTC" -Group "MSMQCluster2" -ResourceType "Distributed Transaction Coordinator"
Set-ClusterResourceDependency -Resource "MSMQCluster2DTC" -Dependency "([MSDTC2Disk]) and ([MSMQCluster2])"
Add-ClusterResource -name "MSMQ-MSMQCluster2" -Group "MSMQCluster2" -ResourceType "MSMQ"
Set-ClusterResourceDependency -Resource MSMQ-MSMQCluster2 -Dependency "([MSMQ2Disk]) and ([MSMQCluster2])"
Start-ClusterResource -name "IP Address 192.168.2.72"
Start-ClusterResource -name "MSMQCluster2"
Start-ClusterResource -name "MSMQCluster2DTC"
Start-ClusterResource -name "MSMQ-MSMQCluster2"