Ponthecomputer
asked on
Is there a way to script a "move group" for windows 2003 clusters?
I'm looking into writing a script that will move the sql group from one node to another node on windows server 2003 two node cluster. Is this possible?
Certainly:
cluster.exe group "Resource Group Name" /move
cluster.exe group "Resource Group Name" /move
ASKER
oBdA,
I thought of using the cmd line you have mentioned in a shell script but I run into the problem of the double quotes as when using run in shell script, it see's the first double quote as being the end of the command. Example:
Dim oShell
Set oShell = WScript.CreateObject ("WSCript.shell")
oShell.run "cluster.exe group "cluster group" /move:node2"
I tried this as well with no luck:
oShell.run "cluster.exe group & chr(34) & cluster group & chr(34) & /move:server2"
the first cmd is interpreted as "cluster.exe group "
the second attempt does not accept chr(34) as a double quote.
By the way, "cluster group" is the name of the group that needs to be moved. Perhpas shellscript is not the way to go?
I thought of using the cmd line you have mentioned in a shell script but I run into the problem of the double quotes as when using run in shell script, it see's the first double quote as being the end of the command. Example:
Dim oShell
Set oShell = WScript.CreateObject ("WSCript.shell")
oShell.run "cluster.exe group "cluster group" /move:node2"
I tried this as well with no luck:
oShell.run "cluster.exe group & chr(34) & cluster group & chr(34) & /move:server2"
the first cmd is interpreted as "cluster.exe group "
the second attempt does not accept chr(34) as a double quote.
By the way, "cluster group" is the name of the group that needs to be moved. Perhpas shellscript is not the way to go?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Looking at it, it seems like too many double quotes but it's exactly what did the trick! Thanks!
http://support.microsoft.com/kb/918992/
http://blogs.techrepublic.com.com/howdoi/?p=140
Execute the procedure from the first link and follow the steps as in Link 2.