[chef] Re: Re: Re: Re: Re: Re: Re: Re: RE: sql server 2008 silent installation


Chronological Thread 
  • From: Aditya Karanjkar < >
  • To: Indra k < >
  • Cc: " " < >
  • Subject: [chef] Re: Re: Re: Re: Re: Re: Re: Re: RE: sql server 2008 silent installation
  • Date: Wed, 9 Jul 2014 11:15:59 -0700

Hi Indra,

If the task has been created correctly, it should install SQL Server. Try the following:
1. Use schtasks to check if the task is created correctly for the installation.
> schtasks /query /tn Install_SQL /v /fo list
2. Run the task manually from the command prompt and check if it installs SQL.
> schtasks /run /i /tn Install_SQL
3. If the above two things are fine, the installer should leave a log file behind. Check it to see if the error is still access denied.

Regards,
Aditya



On Tue, Jul 8, 2014 at 11:45 PM, Indra k < " target="_blank"> > wrote:
Hi Aditiya,
    I have run a following code for sql as you mentioned,it runs successfully .But sql server silent installation doesnot installed in a target machine .It doesnot shows error So what shall i do next?


     execute "Task to install Sql Client" do
        command "schtasks /create /f /sc once /st #{(::Time.now+1).strftime('%H:%M')} /tn Install_SQL /tr \"#{node['sqlstd']['path']} #{node['sqlstd']['installer_options']}\" /RU #{node['sqlstd']['sch_user']} /RP #{node['sqlstd']['sch_passwd']}"
        action :run
end
execute "Run SQL  installer task" do
        command "schtasks /run /i /tn Install_SQL"
        action :run
end

output

2014-07-09T12:11:33+05:30] INFO: Loading cookbooks , , ,
192.168.3.217 [2014-07-09T12:11:34+05:30] INFO: Storing updated cookbooks/sqlstd/recipes/default.rb in the cache.
192.168.3.217 [2014-07-09T12:11:34+05:30] INFO: Powershell light-weight provider already initialized -- overriding!
192.168.3.217 [2014-07-09T12:11:34+05:30] INFO: WindowsPackage light-weight resource already initialized -- overriding!
192.168.3.217 QS /IACCEPTSQLSERVERLICENSE
192.168.3.217 TERMS=TRUE /ACTION="Install" /PID="DDT3B-8W62X-P9JD6-8MX7M-HWK38" /SECURITYMODE=SQ
192.168.3.217 L  /ROLE="AllFeatures_WithDefaults" /INSTANCENAME="MSSQLSERVER" /AGTSVCACCOUNT="
192.168.3.217 NT AUTHORITY\NETWORK SERVICE" /AGTSVCSTARTUPTYPE="Automatic" /RSSVCACCOUNT="NT A
192.168.3.217 UTHORITY\NETWORK SERVICE" /ISSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /ISSVCSTA
192.168.3.217 RTUPTYPE="Automatic" /ASSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /ASSVCSTARTUPT
192.168.3.217 YPE="Automatic" /ASSYSADMINACCOUNTS="WIN-DQ00DBBP3I1\Administrator" /SAPWD="Welc
192.168.3.217 0me"
192.168.3.217
192.168.3.217 [2014-07-09T12:11:34+05:30] INFO: Processing execute[Task to install Sql Client] action run (sqlstd::default line 80)
192.168.3.217 [2014-07-09T12:11:34+05:30] INFO: execute[Task to install Sql Client] ran successfully
192.168.3.217 [2014-07-09T12:11:34+05:30] INFO: Processing execute[Run SQL  installer task] action run (sqlstd::default line 84)
192.168.3.217 [2014-07-09T12:11:34+05:30] INFO: execute[Run SQL  installer task] ran successfully
192.168.3.217 [2014-07-09T12:11:34+05:30] WARN: Skipping final node save because override_runlist was given
192.168.3.217 [2014-07-09T12:11:34+05:30] INFO: Chef Run complete in 4.212008 seconds
192.168.3.217 [2014-07-09T12:11:35+05:30] INFO: Running report handlers
192.168.3.217 [2014-07-09T12:11:35+05:30] INFO: Report handlers complete

Thanks,
 indra


Hi Indra,

My example was with regards to the SCEP client installation. Replace the installation command with the silent install command for SQL Server 2008.

Regards,
Aditya


On Tue, Jul 8, 2014 at 3:18 AM, Indra k < " target="_blank"> > wrote:
Hi Aditya,

                 Have to run those scep code which installs client settings.
I dont understand,need to install scep client and sscm ah what it can do?

          Because my problem is only running sql server silent installation commands it shows access denied error while running from workstation.

Thanks,
indra


Hi Indra,

I haven't tried the winrs method as the 'scheduled task' way I described above sufficed for us. I'll try the winrs method sometime later and let you know. Meanwhile you can try the scheduled task way as described in my previous example and let me know if that works for you.

Regards,
Aditya





On Mon, Jul 7, 2014 at 2:16 AM, Indra k < " target="_blank"> > wrote:
Hi,

      i have tried by giving
winrs.exe -r:"WIN-J34DQLCH" wusa.exe <update> /extract:"C:\"

but it shows the system path  can't specified.

I dont know how to give can u help me in this.


Thanks,
indra


Hi,

May not be related but I hit the similar (access denied) issues when installing any windows package that might need to install a .msu update as a part of the installation process. And as in your case, it runs perfectly when chef-client is triggered from an administrative command within the node itself. It might be related to the following issue:
http://support.microsoft.com/kb/2773898

I have hit this with SCCM client, SCEP client etc. It's a Windows limitation and Chef cannot do anything about it.

My workaround was to create a scheduled task scheduled to run 'once' and fire it off immediately. I don't think you can use the windows_task resource provided by the windows cookbook as it doesn't accept 'once' as a valid schedule. I used the execute resource with 'schtasks' to do the same. Give it a shot and let me know if it works for you:

Example:
execute "Task to install SCEP Client" do
        command "schtasks /create /f /sc once /st #{(::Time.now+1).strftime('%H:%M')} /tn Install_SCEP_Client /tr \"C:\\Windows\\Temp\\Client\\scepinstall.exe #{node['scep_client']['installer_options']}\" /RU #{node['scep_client']['sch_user']} /RP #{node['scep_client']['sch_pass']}"
        action :run
end
execute "Run SCEP Client installer task" do
        command "schtasks /run /i /tn Install_SCEP_Client"
        action :run
end

Best Regards,
Aditya


On Thu, Jul 3, 2014 at 2:10 AM, Indra k < " target="_blank"> > wrote:
hi,
        i have tried out  by creating a separate account with admin rights also in without admin rights still it shows "access denied"


     Inner exception type: System.Security.Cryptography.CryptographicException
            Message: 
                        Access is denied.
                        
Thanks,
Indra


Thanks for response,

                     Actually my sql server 2008 r2 standard edition cookbook is working fine when i run chef-client from a target node .

                       When i run this as 
knife winrm name:"WIN-DQ00DBBP3I1" 'chef-client' -x administrator -P "password" -a ipaddress

it shows a following error which i sent.

I think also same the problem is in permission,like when i run chef-client in administrator user.so i create another account without have admin rights ,again when i run chef-client from a command prompt not even workstation it shows pemission denied errror to c:/chef/cache


From: Kapil Shardha < >
To: Indra k < " target="_blank"> >; " " target="_blank"> " < " target="_blank"> >
Sent: Friday, 27 June 2014 5:26 PM
Subject: [chef] RE: sql server 2008 silent installation

Hi Indra,
 
I am not sure if I understand your statement :
 
As it runs and installs successfully from target machine but when i run this from workstation , it shows error’.
 
What do you mean by running it from workstation? From the SQL summary file, it looks like a permission issue. Please provide some more information on the specific scenario where you experience this issue.
 
-Kapil
 
From: Indra k [mailto: " target="_blank"> ]
Sent: Friday, June 27, 2014 3:19 AM
To: " target="_blank">
Subject: [chef] sql server 2008 silent installation
 
Hi
 
          I have done silent installation  for sql server 2008 r2 using cookbook in open source chef .
 
          As it runs and installs successfully from target machine but when i run this from workstation , it shows error
[2014-06-27T00:06:38-07:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: batch[sql install] (sqlstd::default line 80) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '-2068774911'
172.16.1.114 ---- Begin output of "cmd.exe" /c "C:/Users/ADMINI~1/AppData/Local/Temp/chef-script20140627-2648-1hfdy0h.bat" ----
172.16.1.114 STDOUT: C:\>"C:\Program Files\SQL SERVER 2008 R2\setup.exe"/ConfigurationFile="C:\Program Files (x86)\configuration.ini"
172.16.1.114 The following error occurred:
172.16.1.114 There was an error generating the XML document.
172.16.1.114
172.16.1.114 Error result: -2068774911
172.16.1.114 Result facility code: 1201
172.16.1.114 Result error code: 1
172.16.1.114
172.16.1.114 Please review the summary.txt log for further details
172.16.1.114 Microsoft (R) SQL Server 2008 R2 Setup 10.50.1600.01
172.16.1.114 Copyright (c) Microsoft Corporation.  All rights reserved.
172.16.1.114 STDERR:
172.16.1.114 ---- End output of "cmd.exe" /c "C:/Users/ADMINI~1/AppData/Local/Temp/chef-script20140627-2648-1hfdy0h.bat" ----
172.16.1.114 Ran "cmd.exe" /c "C:/Users/ADMINI~1/AppData/Local/Temp/chef-script20140627-2648-1hfdy0h.bat" returned -2068774911
 
AND MY summary.txt file is :
 
 
Overall summary:
  Final result:                  Failed: see details below
  Exit code (Decimal):           -2068774911
  Exit facility code:            1201
  Exit error code:               1
  Exit message:                  There was an error generating the XML document.
  Start time:                    2014-06-27 12:23:25
  End time:                      2014-06-27 12:23:37
  Requested action:              RunRules
 
Machine Properties:
  Machine name:                  WIN-DQ00DBBP3I1
  Machine processor count:       1
  OS version:                    Windows Server 2008 R2
  OS service pack:               Service Pack 1
  OS region:                     United States
  OS language:                   English (United States)
  OS architecture:               x64
  Process architecture:          32 Bit
  OS clustered:                  No
 
Package properties:
  Description:                   SQL Server Database Services 2008 R2
  ProductName:                   SQL Server 2008 R2
  Type:                          RTM
  Version:                       10
  SPLevel:                       0
  Installation location:         C:\Program Files\SQL SERVER 2008 R2\x86\setup\
  Installation edition:          DATA_CENTER
 
User Input Settings:
  ACTION:                        RunRules
  CONFIGURATIONFILE:             C:\Program Files (x86)\configuration.ini
  ENU:                           True
  FARMACCOUNT:                   <empty>
  FARMADMINPORT:                 0
  FARMPASSWORD:                  *****
  FEATURES:                      
  HELP:                          False
  IACCEPTSQLSERVERLICENSETERMS:  True
  INDICATEPROGRESS:              False
  INSTANCENAME:                  MSSQLSERVER
  PASSPHRASE:                    *****
  QUIET:                         False
  QUIETSIMPLE:                   True
  RULES:                         GlobalRules
  UIMODE:                        Normal
  X86:                           True
 
  Configuration file:            C:\Program Files (x86)\Microsoft SQL Server\100\Setup Bootstrap\Log\20140627_122318\ConfigurationFile.ini
 
Detailed results:
 
Rules with failures:
 
Global rules:
 
There are no scenario-specific rules.
 
Rules report file:               The rule result report file is not available.
 
Exception summary:
The following is an exception stack listing the exceptions in outermost to innermost order
Inner exceptions are being indented
 
Exception type: Microsoft.SqlServer.Chainer.Infrastructure.ChainerInfrastructureException
    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, XmlSerializerNamespaces namespaces)
                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: 
                        Access is denied.
                        
            Stack: 
                        at System.Security.Cryptography.ProtectedData.Protect(Byte[] userData, Byte[] optionalEntropy, DataProtectionScope scope)
                        at Microsoft.SqlServer.Common.SqlSecureString.WriteXml(XmlWriter writer)
                        at System.Xml.Serialization.XmlSerializationWriter.WriteSerializable(IXmlSerializable serializable, String name, String ns, Boolean isNullable, Boolean wrapped)
                        at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSqlEngineSetupPublic.Write6_SqlEngineSetupPublic(String n, String ns, SqlEngineSetupPublic o, Boolean isNullable, Boolean needType)
                        at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterSqlEngineSetupPublic.Write7_SqlEngineSetupPublic(Object o)
 

















Archive powered by MHonArc 2.6.16.

§