4 Replies Latest reply on Jan 23, 2013 9:28 PM by Lazar NameToUpdate

    SQL Server silent installation

    Antonio Caputo

      Hello everybody.

       

      Has anyone experience in silent installation of Sql Server with BladeLogic?

       

      By following the doc: https://communities.bmc.com/communities/docs/DOC-20693

       

      I am trying to install SQL Server 2012 on a Win 2008 R2 in the following way:

       

      echo [OPTIONS] > c:\temp\MyConfigurationFile.ini

      echo ACTION="Install" >> c:\temp\MyConfigurationFile.ini

      echo FEATURES=SQLENGINE,SSMS >> c:\temp\MyConfigurationFile.ini

      echo INSTANCENAME="MSSQLSERVER1" >> c:\temp\MyConfigurationFile.ini

      echo INSTANCEID="MSSQLSERVER1" >> c:\temp\MyConfigurationFile.ini

      echo SQLSYSADMINACCOUNTS="Administrator" >> c:\temp\MyConfigurationFile.ini

      echo IAcceptSQLServerLicenseTerms="True" >> c:\temp\MyConfigurationFile.ini

      echo UpdateEnabled="False" >> c:\temp\MyConfigurationFile.ini

      echo SQMREPORTING="False" >> c:\temp\MyConfigurationFile.ini

      echo ERRORREPORTING="False" >> c:\temp\MyConfigurationFile.ini

      echo INDICATEPROGRESS="False"

      echo QUIET="False"

       

      setup.exe /QS /ConfigurationFile=c:\temp\MyConfigurationFile.ini

       

      If I connect on the server in mstsc run it manually on the server it goes successfully, while it fails if I run it via BLPackage with the following error:

       

      Info          22-gen-2013 23.47.09           [stdout: 2]           The following error occurred:

      Info          22-gen-2013 23.47.09          Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.

      Info          22-gen-2013 23.47.09          Error result: -2146233079

      Info          22-gen-2013 23.47.09          Result facility code: 19

      Info          22-gen-2013 23.47.09          Result error code: 5385

      Info          22-gen-2013 23.47.09          Please review the summary.txt log for further details

       

      Thanks in advance for any hint.

      Antonio

        • 1. Re: SQL Server silent installation
          Joe Piotrowski

          Typically when troubleshooting Microsoft installation failures I will check the Windows Application Logs as well as the install log. Windows will usually dump an install log in %temp% or whatever the default temp location is. Those logs are frequently helpful.

          • 2. Re: SQL Server silent installation
            Jae Yi

            Please refer to the following:

             

            For creating the Configuration File:

             

            http://msdn.microsoft.com/en-us/library/dd239405.aspx

             

            For installing via "command line":

             

            http://msdn.microsoft.com/en-us/library/ms144259.aspx

            • 3. Re: SQL Server silent installation
              Antonio Caputo

              This is what I used for my purposes:

               

              set UTENTE=test

              set PASSWORD=test

              set DATABASE=test

               

               

              ServerManagerCmd -install Net-Framework

               

               

              REM -- Creo MyConfigurationFile.ini

              echo [OPTIONS] > c:\temp\MyConfigurationFile.ini

              echo ACTION="Install" >> c:\temp\MyConfigurationFile.ini

              echo FEATURES=SQLENGINE,SSMS >> c:\temp\MyConfigurationFile.ini

              echo INSTANCENAME="MSSQLSERVER1" >> c:\temp\MyConfigurationFile.ini

              echo INSTANCEID="MSSQLSERVER1" >> c:\temp\MyConfigurationFile.ini

              echo SQLSYSADMINACCOUNTS="Administrator" >> c:\temp\MyConfigurationFile.ini

              echo IAcceptSQLServerLicenseTerms="True" >> c:\temp\MyConfigurationFile.ini

              echo UpdateEnabled="False" >> c:\temp\MyConfigurationFile.ini

              echo SQMREPORTING="False" >> c:\temp\MyConfigurationFile.ini

              echo ERRORREPORTING="False" >> c:\temp\MyConfigurationFile.ini

              echo INDICATEPROGRESS="False"

              echo QUIET="False"

              REM ------------------

               

               

               

               

              cd c:

              c:\sqlserver\setup.exe /QS /ConfigurationFile=c:\temp\MyConfigurationFile.ini

              REM c:\sqlserver\setup.exe /QS /ACTION=Install FEATURES=SQLENGINE /INSTANCENAME=MSSQLSERVER1 /INSTANCEID=MSSQLSERVER1 /IACCEPTSQLSERVERLICENSETERMS=TRUE /SQLSYSADMINACCOUNTS=Administrator

               

               

              reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL11.MSSQLSERVER1\MSSQLServer" /f /v "AuditLevel" /t REG_DWORD /d 3

              net stop "MSSQL$MSSQLSERVER1"

              net start "MSSQL$MSSQLSERVER1"

               

               

              REM -- Creo create.sql

              echo create login %UTENTE% WITH PASSWORD='%PASSWORD%', CHECK_POLICY = OFF > c:\temp\create.sql

              echo go >> c:\temp\create.sql

              echo create database %DATABASE% >> c:\temp\create.sql

              echo go >> c:\temp\create.sql

               

               

              echo use [%DATABASE%] >> c:\temp\create.sql

              echo go >> c:\temp\create.sql

              echo create user [%UTENTE%] from login [%UTENTE%] WITH DEFAULT_SCHEMA=[%UTENTE%] >> c:\temp\create.sql

              echo go >> c:\temp\create.sql

               

               

              echo USE master >> c:\temp\create.sql

              echo GO >> c:\temp\create.sql

              echo GRANT CONNECT SQL TO %UTENTE% >> c:\temp\create.sql

              echo GO >> c:\temp\create.sql

               

               

              echo USE %DATABASE% >> c:\temp\create.sql

              echo GO >> c:\temp\create.sql

              echo exec sp_changedbowner '%UTENTE%' >> c:\temp\create.sql

              echo GO >> c:\temp\create.sql

              REM ------------------

               

               

              "C:\Program Files\Microsoft SQL Server\110\Tools\Binn\sqlcmd" -S 127.0.0.1\MSSQLSERVER1 -i c:\temp\create.sql

              • 4. Re: SQL Server silent installation

                Based on the error message you received, I'd try using the following setting to see if the issue resolves: on the target server, go to BMC Server Automation RSCD Agent service Properties / Log On Tab / check "allow service to interact with desktop", restart the agent, and retest your job.

                 

                Here's a list of other check points for when you have a command that works manually, but does not work via Blade:

                KA346631 - BBSA Custom Deploy Troubleshooting: Custom BLPackage Deploy Job failure

                https://kb.bmc.com/infocenter/index?page=content&id=KA346631