7 Replies Latest reply on Sep 13, 2016 11:00 AM by Chad Wadkins

    BSA: Install SQL Server service packs as custom software

    Chad Wadkins

      We do not have BDA available to us, so we are attempting to setup SQL Server installs using BSA (8.7P2).  I am able to get the base SQLS 2012 standard down without an issue (custom software, deployed via BLPackage using an .ini file to run in quiet mode).

       

      When SQLS2012 SP3 is attempted though, BSA reports a successful job run (Bldeploy done - nRet = 1 (Apply successful) exitCode = 0 (Deployment succeeded)), yet I find that the SP3 is not installed and the logs on the server show an exception (see log excerpt below).

       

      I even referenced How to deploy SQL Server 2008 - BMC Server Automation 8.6 - BMC Documentation, which outlines what I am attempting to do and I still can't seem to get the SP installs beyond the exception being thrown.

       

      And the reason I pose the question here is because when I copy the command being executed (SQLServer2012SP3-KB3072779-x64-ENU.exe /quiet /allinstances /IAcceptSQLServerLicenseTerms) out of the BLPackage, paste it in the command line on the box directly, the SP3 installs without an issue, so I am wondering if someone can help me with getting this to work in BSA.

       

      Any help with this would be appreciated.

       

      Thanks,

      Chad...

      --

      (log excerpt)

      (01) 2016-09-01 17:02:25 Slp: Microsoft.SqlServer.Setup.Chainer.Workflow.ActionExecutionException: Thread was being aborted. ---> System.Threading.ThreadAbortException: Thread was being aborted.

      (01) 2016-09-01 17:02:25 Slp:    at System.Threading.WaitHandle.WaitOneNative(SafeWaitHandle waitHandle, UInt32 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext)

      (01) 2016-09-01 17:02:25 Slp:    at System.Threading.WaitHandle.WaitOne(Int64 timeout, Boolean exitContext)

      (01) 2016-09-01 17:02:25 Slp:    at Microsoft.SqlServer.Configuration.UIExtension.ShowActiveObjectTemplate.Show(String moniker)

      (01) 2016-09-01 17:02:25 Slp:    at Microsoft.SqlServer.Configuration.UIExtension.UserInterfaceService.Start(String moniker, Predicate`1 pageFilter)

      (01) 2016-09-01 17:02:25 Slp:    at Microsoft.SqlServer.Configuration.UIExtension.StartAction.ExecuteAction(String actionId)

      (01) 2016-09-01 17:02:25 Slp:    at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)

      (01) 2016-09-01 17:02:25 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun, ServiceContainer context)

      (01) 2016-09-01 17:02:25 Slp:    --- End of inner exception stack trace ---

      (01) 2016-09-01 17:02:25 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun, ServiceContainer context)

      (01) 2016-09-01 17:02:25 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionWithRetryHelper(WorkflowObject metaDb, ActionKey action, ActionMetadata actionMetadata, TextWriter statusStream)

      (01) 2016-09-01 17:02:25 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream)

      (01) 2016-09-01 17:02:25 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream)

      (01) 2016-09-01 17:02:26 Slp: Received request to add the following file to Watson reporting: C:\Windows\TEMP\tmpE0BE.tmp

      (01) 2016-09-01 17:02:26 Slp: The following is an exception stack listing the exceptions in outermost to innermost order

      (01) 2016-09-01 17:02:26 Slp: Inner exceptions are being indented

      (01) 2016-09-01 17:02:26 Slp:

      (01) 2016-09-01 17:02:26 Slp: Exception type: System.InvalidOperationException

      (01) 2016-09-01 17:02:26 Slp:     Message:

      (01) 2016-09-01 17:02:26 Slp:         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.

      (01) 2016-09-01 17:02:26 Slp:     HResult : 0x80131509

      (01) 2016-09-01 17:02:26 Slp:     Stack:

      (01) 2016-09-01 17:02:26 Slp:         at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)

      (01) 2016-09-01 17:02:26 Slp:         at Microsoft.SqlServer.Configuration.UIExtension.ShowWizard.ShowUserInterface()

      (01) 2016-09-01 17:02:26 Slp:         at Microsoft.SqlServer.Configuration.UIExtension.ShowActiveObjectTemplate.ThreadStart(Object obj)

      (01) 2016-09-01 17:02:27 Slp: SQM Service: Sqm does not have active session.

       

      ,

        • 1. Re: BSA: Install SQL Server service packs as custom software
          Bill Robinson

          "when I copy the command being executed (SQLServer2012SP3-KB3072779-x64-ENU.exe /quiet /allinstances /IAcceptSQLServerLicenseTerms) out of the BLPackage, paste it in the command line on the box directly"

          -> are you logged in as the same user you map to via bsa when you do this ?

           

          "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."

          -> seems to be the problem.  maybe there is some additional argument you need to suppress whatever this 'modal dialog box' is.

          • 2. Re: BSA: Install SQL Server service packs as custom software
            Chad Wadkins

            Bill -

             

            Thanks for the reply.

             

            I have had a second person review my work to see if I was missing something and they are seeing the same issue as I am.

             

            ->Yes, we made sure to log in as the same user that BSA is executing as and we are able to manually apply the SP with the same flags set on the command line.

             

            ->We agree that the exception is the 'modal dialog box' and so far we have not seen what could suppress it...our understanding is that the use of /Q or /quiet should be that suppressor, yet it seems to not be working as expected.

             

            The following link even shows a case where someone was using /QS, receiving the same error we are and switched to /Q to fix it. (we do not get the same result)

            Remote SQL Server Unattended Installation Error: Showing a modal dialog box or form when the application is not running …

             

            Anyway, we caught up with out DB team here and they seem to have an alternative solution that they just are testing out now...in a nutshell, it would use a parm in the Config.ini during the initial 2012 Standard base install to tell it there are updates to apply.

             

            Again, they are testing it out now (as it is a change to how they have typically applied SPs in the past)...when they are done, we will then run it through BSA and after all that, I will provide an update here.

             

            Thanks again,

            Chad...

            • 3. Re: BSA: Install SQL Server service packs as custom software
              Chad Wadkins

              Bill -

               

              An update on what we found...

               

              Since we could not get the independent installs of the SP3 and SP3_CU3 packages to apply successfully, we worked with the DB team here to find an alternative solution.

               

              What it boils down to is we re-wrote the BLPkg to run one external command as follows:

              \\host\path\to\SQL_install_bin\setup.exe /ConfigurationFile="\\host\path\to\SQL_install_cfg\ConfigurationFile.ini"

               

              In that ConfigurationFile.ini, the following parms need to be set to handle the SP and patch installs:

              UpdateEnabled="True"

              UpdateSource="\\host\path\to\SQL_SPpatch_folder"

               

              As of our most recent tests, this method installed the base SQL Server, an SP on top of that and a patch to that SP all in one command execution.

               

              If you have any questions on this or if you believe I should add any additional information to allow this thread to be of benefit to others, just let me know.

               

              Thanks,

              Chad...

              • 4. Re: BSA: Install SQL Server service packs as custom software
                Jim Campbell

                Is this for new installs or for patching existing installs?  Is the user executing the patch in your initial testing a SQL SA ?

                • 5. Re: BSA: Install SQL Server service packs as custom software
                  Chad Wadkins

                  Jim -

                   

                  This specific use case is designed for new installs of SQL Server only, with the requester providing input of a target host system and choosing the SQL Server version from a drop-down list.

                   

                  The selections in the drop-down list are dictated by the DBA team, based on what they are currently supporting and the SP/patch binaries found in the 'UpdateSource=' location are handled by that team as well, again based on what they are currently supporting at that time.

                   

                  Also, the DBA team has full access to the folder that 'UpdateSource' points to, so that as they validate SPs and patches for their supported db versions, they can remove superseded and add new binaries as needed.  Again, this does not address patching already existing databases.  It's purpose is to attempt to keep any databases that are newly created by this process as up-to-date as possible when first installed.

                   

                  Thanks,

                  Chad...

                   

                  *Note: This process is not handled by BSA exclusively, the initial question was based on just the BSA piece that we were trying to figure out.  The overall process utilizes Remedy to generate the request, which triggers a BAO process and that BAO process calls specific BSA functions, which includes the SQL Server Install piece discussed here.

                  • 6. Re: BSA: Install SQL Server service packs as custom software
                    Bill Robinson

                    i think the update source can be local right ?  i think as long as that was set to the location used by the blpackage for the install, and that location was still there, the sp3 installer should find it right ?

                    • 7. Re: BSA: Install SQL Server service packs as custom software
                      Chad Wadkins

                      Yes, the UpdateSource parm can be a local directory and that is what we are using in the ConfigurationFile.ini we have setup in our BLP...and as long as that location exists and there are the SP or patch bundles in it, the SQL Server setup.exe using the config file with that parm set will find those binaries and install them after it finishes the base install.

                       

                      Thanks,

                      Chad...