Installing SQL Server 2008 on Failover Cluster ...... remotely :)

rated by 0 users
This post has 1 Reply | 1 Follower

Not Ranked
Posts 1
jadkar Posted: 05-04-2012 10:57 AM

Without getting too technical (just yet) let me try and explain what I am doing.  I am just about done with a script that installs a 2 node cluster on Server 2008, creates resources and then installs SQL server 2008.

The SQL server install portion uses a configuration file to install on the first node.  After which I have Powershell copy another required .ini file to the second node.  My plan is then to remote execute the SQL setup.exe on the second node using the ini file I just copied there.

This is the last step in my script and I'm stumped.  I tired using WMI to execute the command like this.....

--------------------------------------------

#Install SQL onto Node 2

$strRemoteSQlconfigFile = $strSQLPath + "\config_add_node2.ini"

$strCMD = $strSQLPath + "setup.exe /ConfigurationFile=" + $strRemoteSQlconfigFile

 

Write-Host “Installing software on $strNode2”

Copy-Item ($strCurrentPath + "\SQL\config_add_node2.ini") ("\\" + $strNode2 + "\" + $strSQLPath.Replace(":","$"))

 

$Process = ([WMICLASS]“\\$strNode2\ROOT\CIMV2:win32_process”)

$Remote = $Process.Create(“cmd.exe /c $strCMD”)

If ($Remote.returnvalue -eq 0) {

        Write-Host "Successfully launched $cmd on $computername with a process id of" $Remote.processid -ForegroundColor GREEN

    }

    else {

        Write-Host "Failed to launch $strCmd on $strNode1. ReturnValue is" $Remote.ReturnValue -ForegroundColor RED

    }

--------------------------------------------------------------

The above works just fine however when I look at the second node where the process started I see it failed right away.  In the SQL install log I see this entry....

 Message: 

        There was an error generating the XML document.

    Data: 

      DisableWatson = true

    Stack: 

        at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(String rootPath, Object objectToSerialize, Boolean saveToCache)

        at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(Object objectToSerialize)

        at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.SaveInputSettingValueToObject(InputSettingInfo inputSettingInfo, List`1 values)

        at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.SaveParsedArgumentsIntoInputSettingStore(InputSettingSource source, Dictionary`2 parsedArguments, Boolean chainerSetting, Boolean ignoreSettingsForNotAllowedScnearios)

        at Microsoft.SqlServer.Chainer.Infrastructure.InputSettingService.ProcessConfigFile(String configFileFullPath, Boolean chainerSetting, Boolean ignoreSettingsForNotAllowedScnearios)

        at Microsoft.SqlServer.Configuration.BootstrapExtension.ProcessConfigFileArguments.ExecuteAction(String actionId)

        at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)

        at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun)

    Inner exception type: System.InvalidOperationException

        Message: 

                There was an error generating the XML document.

        Stack: 

                at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)

                at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o)

                at Microsoft.SqlServer.Chainer.Infrastructure.DataStoreService.SerializeObject(String rootPath, Object objectToSerialize, Boolean saveToCache)

        Inner exception type: System.Security.Cryptography.CryptographicException

            Message: 

                        The requested operation cannot be completed. The computer must be trusted for delegation and the current user account must be configured to allow delegation.

 

 

I also tried doing a quick test and broke the install out into a separate script and used invoke-command -computername srvname {c:\somelocation\scriptname.ps1}

but I get the same results.  I understand that the second node is having issues with either my user ID or the computer from which I am executing the command from but I'm not sure how to solve this.  My user ID is part of domain admin group and I can't change too many things in the environment to get this to work because once the script is done it will be used globally in different offices to install cluster / SQL / and an application.  The idea is for the local SAs to have to do as little as possible to get this rolled out.

 

Sorry for being long winded, any help would be much appreciated!!

Top 25 Contributor
Posts 296
Microsoft MVP
Top Contributor

If I understand correctly you are:

  • performing some actions on node A remotely
  • trying to perform some actions on node B as a remote action from node A

This will not work.

You have tripped over the double hop problem in that you cannot delegate your credentials from a remote machine to a second remote machine.

You have a couple of options:

  1. Use CREDSSP to delegate credentials. In PowerShell v2 this CANNOT be done remotely - you will need to rdp to node A and perform this action
  2. Modifiy your process so that the work on node B is initiated from your local machine - this may involve copying files from node a to the local machine and then to node b
Page 1 of 1 (2 items) | RSS
Copyright 2012 PowerShell.com. All rights reserved.