【发布时间】:2020-09-01 23:14:21
【问题描述】:
我想使用 cluster.exe 创建一个批处理脚本
我的初始批处理脚本(FAILOVER_TO_DRDB01.BAT)是:
ECHO ON
cluster.exe node DRDB01 /status -o C:\FAILOVER_TO_DRDB01_LOG.txt
当我尝试运行它时,没有创建输出。
我的主要目标是它会输出这个:
Listing status for node 'DRDB01':
Node Node ID Status
-------------- ------- ---------------------
DRDB01 3 Joining
一旦它看到 Status 是 Joining,它将运行以下脚本:
net.exe stop clussvc
net.exe start clussvc /forcequorum
一旦发生故障转移,它将运行以下脚本:
cluster.exe node DRDB01 /prop nodeweight=1 /prop:NodeWeight /status
cluster.exe node PDCDB01 /prop nodeweight=0 /prop:NodeWeight /status
cluster.exe node PDCDB02 /prop nodeweight=0 /prop:NodeWeight /status
【问题讨论】:
标签: sql-server batch-file failovercluster