VMware Horizon Community
btrabue
Enthusiast
Enthusiast

Application with SQL Express not running SQL server when started

Hello-

I have an UPS Billing application that I have been asked to thinapp for a user.  I run through the process of installing it and stopping the SQL services before packaging it.  Everything seems fine and I don't receive any errors.  I then apply the thinapp to my test VM and when it is ran I get an error that application could not connect to the SQL server.  I am almost 100% sure that the SQL service is not starting because I have this very same problem with another application that I am trying to build.

Can anyone tell me what I am doing wrong?  I am following the instructions that are listed on VMWare Blog below to thinapp SQL Express.

http://blogs.vmware.com/thinapp/2009/03/how-to-thinapp-msdesql-2005-express.html

The application that I am trying to thinapp is below if anyone wants to try it.

http://www.ups.com/content/us/en/resources/techsupport/billing_analysis_tool/downloads.html

BTW...

I am doing this on a clean XP VM with nothing more installled than the thinapp application.

Thank you!

Tags (2)
0 Kudos
7 Replies
pbjork
VMware Employee
VMware Employee

In order to verify if SQL server is started or not please investigate the Event log and/or run cmd.exe outside the virtual environment and execute netstat -an if SQL uses the standard port should you see 0.0.0.0:1433 being available..

0 Kudos
btrabue
Enthusiast
Enthusiast

I ran netstat -an and came up with this.  I did the same command on the VM before I packaged it and got the same results.

Capture.JPG

If I try to run the SQL Configuration tools I get a completely different error.

Capture1.JPG

This is the exact same VM that I built the thinapp on.  I just refreshed it to the original snapshot and installed the thinapp via the msi file.

0 Kudos
TobyFruthParson
Enthusiast
Enthusiast

Is the SQL service set to automatic in the virtual registry?  Is it set as a service in Package.ini?

Your project's Package.ini may have a line that looks like this (example):

[SQL_Server_Service.exe]
Source=%ProgramFilesDir%\Microsoft SQL\SERVICE.EXE
Shortcut=Application.dat
;Services=sql_service
Disabled=1

Remove the semicolon from in front of the Services= line.  The SQL service should, in theory, start automatically without having to take this step.  Removing the semicolon should make it so that the SQL service starts automatically when the application is launched, and will also install it as a service if you install the application with MSI.  Rebuild.  Test your app.

Is there a VB script that will ensure that the service starts before the app?  I thought I saw an article on that somewhere.

Toby Fruth, Sr. Specialist, The Parsons Corporation
0 Kudos
TobyFruthParson
Enthusiast
Enthusiast

Perhaps this is the article of which I was thinking:

http://blogs.vmware.com/thinapp/2009/07/thinapp-services.html

Toby Fruth, Sr. Specialist, The Parsons Corporation
0 Kudos
btrabue
Enthusiast
Enthusiast

I tried everything and so far I am not having any luck.  I install the app, set it up completely, stop the SQL service and build the package.  It flat out will not run as a thinapp on any VM that I assign it to.  What could I be missing?  

0 Kudos
TobyFruthParson
Enthusiast
Enthusiast

I have found that with SQL Server express it may not use the default port of 1433.  Also, it may install "out of the box" with a setting that does not allow "remote" connectivity.  I notice from the UPS site that .NET 2 installs with the app, and that it requires XP SP3.

How about trying this:

  1. Capture the app install, including .NET 2 and SQL Express.  Make sure it works.
  2. Run Microsoft Update and update and .NET 2 components and SQL Server components.  Reboot if necessary and resume the capture.
  3. Test the application again.
  4. Stop the SQL Server service, but make sure it's set to start Automatically.
  5. Open a command prompt to c:\Windows\Microsoft.NET\Framework\v2.0.50727 and run "ngen executequeueditems"
  6. Run the ngen command until there's nothing left to compile.
  7. Start the SQL Server service.  Open the SQL Server Configuration Manager and force the application to use the standard port of 1433.
  8. You can also try setting the SQL Server instance to allow remote TCP connectivity.  I can understand why this is disabled by default, but if you need to get this app working then it might be necessary.
  9. Run postscan, remove unnecessary files from the project, set the SQL Server service to install (in Package.ini), and build.
  10. Let us know what happens.

My apologies in advance if you tried all of this, or I repeated something from one of the articles.

Toby Fruth, Sr. Specialist, The Parsons Corporation
0 Kudos
btrabue
Enthusiast
Enthusiast

Thank you for keeping up on this.  I have been trying different things for several weeks now and nothing has worked.   I think that my problem is I see no way to install SQL Express seperately.  The UPS software wants to install it's version.  There is a screen that comes up to select the SQL file that I have downloaded manually and it is supposed to install that version of SQL but when it gets to that point I get an error telling me that it cannot find the specified file.  This application by far has been the most difficult to do.

0 Kudos