SQL Server 2012 Express Setup Issue - by Fischer.Chris

Status : 

  Won't Fix<br /><br />
		Due to several factors the product team decided to focus its efforts on other items.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 741476 Comments
Status Closed Workarounds
Type Bug Repros 15
Opened 5/10/2012 3:22:42 AM
Access Restriction Public


I'm trying to install the SQL Server 2012 Express Edition silently inside our Setup (Install Shield 2011 Basic msi Project) as a Prerequisite. The Sql Server Setup is starting but hangs up at the point where the sql server installation support files are going to be installed/copied. Opening the Logfile 'C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\Detail_ComponentUpdate.txt' - it shows: 
(01) 2012-05-09 09:17:24 Slp: Invoking QueryServiceStatus Win32 API
(01) 2012-05-09 09:17:24 Slp: Sco: Attempting to close service handle for service msiserver
(01) 2012-05-09 09:17:24 Slp: Sco: Attempting to close SC Manager
(01) 2012-05-09 09:17:29 Slp: Sco: Attempting to open SC Manager
(01) 2012-05-09 09:17:29 Slp: Sco: Attempting to open service handle for service msiserver

in an endless loop. So i did some further investigation a found out that my setup/msi is the problem. I think at this point the sql server setup tries to stop my msi through the msiserver but with no luck.
When I start the sql server setup from the commandline with the same parameters as in my own setup it installs just fine. 
In our old Setup we did install the Sql Server 2008R2 Express like above and it worked fine. The only thing I changed were the Sql Server Setup files and Configuration files.
Sign in to post a comment.
Posted by Mr. Andersen on 1/30/2015 at 4:06 AM
We also distribute and install SQL Server Express as part of our installation, which is used by 2000+ customers every year. This error seems to pop up at random, forcing us to investigate and troubleshoot each issue and getting our customers angry at us for depending on SQL Server for our software.

To avoid these installation issues, our newest software now has the option of using SQLite instead of SQL Server, even though SQLite performs worse than SQL Server. Unfortunately our older software is still used by many of those customers, which prevents us from migrating away from SQL Server completely.

Every customer who would start using SQL Server Express and later transition into SQL Server Standard Edition, now have to reconsider this transition and instead stay with the free SQLite version instead. I know Microsoft aren't making money selling SQL Server Express, but not providing proper installation support also means losing out on potential sale on SQL Server Standard Edtion.

I consider this a lose/lose/lose situation, where we have unhappy customers, customers have a slower database solution and Microsoft loses a potential server product sale.
Posted by KevinMS on 9/5/2014 at 9:02 AM
I used task manager and killed the Windows Installer instances, clicked Retry and the installation completed. What a beat down.
Posted by simdoc on 1/21/2014 at 7:11 AM
If nothing else, give a command line argument to override this behavior so it can be in a custom action.
Posted by Fredrik Vestin on 12/11/2012 at 3:51 AM
the same issue is also reported here. I suggest you vote for that as well. This needs to be fixed.

Posted by SAinCA on 11/27/2012 at 1:10 PM
I don't have 1,000's but I do have 100 sites and some of those can't be done by "us" due to customer policies, so to put a predicted-to-fail Installer in their hands is embarrassing, not just for us but it should also be for Microsoft. Customers need a simple-one-click Installer. I thought Microsoft wants that, too... Why not with an encapsulated SQL2012 Express Install?

Stop putting roadblocks in the way of usage of your software, Microsoft, or do you mean to continually shoot yourselves in the foot? One wonders...

And Windows 8 - "forget about it" - too many reported issues w/ SQL Server installs to even step on that landmine!
Posted by S Hipwell on 11/6/2012 at 6:50 AM
This is a massive issue for us and our 1000s of customers who all use SQL Express and have to option to upgrade to a full version of the product. The problem is made even worse by Windows 8 shipping without the correct settings to run SQL 2008 (.NET 3.5 is off by default, although I'm not sure why .NET 4.5 doesn't just work?).
Posted by Venkat9719209 on 10/25/2012 at 5:17 AM
This issue is also pressent in SQL Server 2008R2 SP2 version (SP1 does not have this issue). However the problem is even if we ship our product with SQL Server 2008R2 SP1, if the target user PC is having SP2 version already (or installed after installing our product) same issue can be observed.
This issue can be observed even during removal of database instance (Goes for infinite loop). So if end user PC is having SQL Server 2008R2 SP2 during uninstallation of your product you can not delete the database instance. I can't understand why SQL installer has to check for prerequisites and try to shutdown the windows installer for removing just a database instance.
Currently this issue is not observed in SQL Server 2008 SP3 which is the latest service pack version. But I am not sure whether Microsoft relase SP4 for SQL Server 2008 with this issue.
Posted by Jonathan Dyke on 10/19/2012 at 5:16 PM
For developers

The SQL Server 2012 express installation hangs if you attempt to install it from within your installation. All installations that use windows installer (including those that use 3rd party products like InstallShield) are affected.

As the SQL Server 2012 express bootstrap is installing prerequisites, it attempts to shut down the windows installer service (msiserver). Because your installation is using the windows installer service, it cannot be shutdown. When the SQL Server 2012 express bootstrap receives this error, it falls into an infinite retry loop which cannot be canceled. Your only option at this point is to end the task.

Resolution #1:
Change your installation so it uses a bootstrapper and install SQL Server before your installation actually starts.

Resolution #2:
Change your application to install SQL Server the first time it runs.

Resolution #3:
Continue distributing SQL Server 2008 R2 express or earlier.

Additional Information:
After extensive testing with Microsoft Support, we were able to determine that there is nothing you can do to change the outcome. In fact, simply starting an installation (yours or anything else that uses windows installer) and letting it sit at the first screen (usually a "Welcome" of some sort) is enough to recreate this issue. Open a command prompt at this point and type "net stop msiserver". If you receive an error (other than "service is not started" of course), the SQL Server 2012 express installation will hang as it's trying to install prerequisites. Even manually running the The SQL Server 2012 express installation by double clicking on its executable produces the same behavior. Basically, it doesn't matter if you run it in silent mode or not. It doesn't matter what combination of command line options you use. All that matters is that windows installer can't be stopped because it is being used by another installation.

If you try to pre-install all of the prerequisites yourself, it will still hang as it attempts to install the "SQL Server Setup Support files". Yes, you can extract the msi and preinstall it yourself but if you're smart enough to figure that out, you should also be smart enough to figure out why it's a bad idea.

Ok, devs... That's all you need to know. Please do us all a favor and click the "I can too" link before you go.

For whoever decided that this won't be fixed

Please consider the following:

1) The express edition is designed for developer redistribution.
2) Most windows developers use windows installer because Microsoft tells us we have to.

If you want windows developers to redistribute your engine, shutting down windows installer isn't a very good idea.

Now take this a step further: If I can't upgrade my smaller clients to 2012 express, I won't tell my large ones to to upgrade to 2012 standard/enterprise either. In fact, I'll probably tell them NOT to upgrade.

Take a minute and actually think it through.

To be clear: you just told every developer who uses the SQL express redistributable with Windows Installer that they can't use SQL Server 2012. That means all of our customers will stay on older versions of SQL Server, even the ones who would pay for the upgrade.

Right now, you're looking at thousands of SQL Server instances that won't be upgraded to 2012. And that's just people who use MY software. Add to that every user of the other developers who reported this and you could easly be over ten thousand. God only knows how many developers read your response and didn't bother commenting or clicking the "I can too" link. How many new customers do you think we'll all pick up over our next release cycles? I guess it doesn't matter because they won't be using SQL Server 2012 either.

I've tried to keep it nice with this post, but I think you're the one who needs to hear what I said to MS support. They were great and I'd feel bad that I unloaded on them without saying the same to you:

"Now, what in the world made you guys think that shutting down windows installer was a good idea?!?

Beyond that, you guys allow the installation to keep retrying indefinitely. That’s just bad. I expect infinite loops from students and 1st year programmers. I never expected to find a complete noob mistake from someone qualified to work at Microsoft. And it’s still there, in your brand new version, nearly 3 months after it’s been reported..? You’ve got to be kidding me. 3 months ago, I wouldn’t have believed it was possible. Now.. well.. I stand corrected.

No matter how you look at it, a mistake was made that needs to be corrected. These 2 problems are silly, obvious and easy to fix. They should have been done & waiting for testing a day after I reported them."

Last, I'd like to share a direct quote from your support staff after it was determined that this was not a bug and that it won't be fixed:

"Not sure what I can say, I myself was floored to find out this is by design"

Are you sure you don't want to reconsider your response?

Again, take a minute and actually think it through.
Posted by Sidetnee on 9/17/2012 at 4:22 AM
Can we just clarify this, Microsoft's stance on this matter is that this is something that we used to be able to do in SQL 2008, that is no longer possible in 2012 and the response is basically "Yes we meant to break it". To hell with anyone who tries to use Industry standard installation programs/technologies to install you have to do it a different way now.

Thanks guys, much appreciated.
Posted by Microsoft on 8/13/2012 at 12:01 PM
Hi all, thanks for taking the time to report this issue. Installing SQL Server 2012 from within a Windows Installer transaction is not supported. Setup needs to be launched from outside of windows installer and can't be done from a custom action.

[SQL Server Team]
Posted by tabg_bt on 8/12/2012 at 12:47 AM
I have the same issue with SQL Sever 2012 Express from setup of InstallShield 2012.
The workaround did not work.
Posted by epsbrian on 8/10/2012 at 12:04 PM
I experiencing the same issue as Chris trying to install SQL Server inside of an Advanced Installer msi. I was unable to get it to work with either the regular express installer or the installer with tools. I attempted vijayaraja.m's workaround but it did not work.
Posted by vijayaraja.m on 7/24/2012 at 6:14 AM
I used the below command to install sqlexpress 2012 silently, but ended in an infinite loop as mentioned in this problem statement.


Hope this would help you to reproduce the problem.
Posted by vijayaraja.m on 7/24/2012 at 5:45 AM
I'm also facing the same problem. I'm trying to install SQL express 2012 on Windows 7 English OS through Installshield 2010.
Posted by Yoshiaki Hirose on 6/18/2012 at 10:28 PM
I'm also having the same problem. I'm using Install Shield 12
Posted by Fischer.Chris on 5/15/2012 at 11:45 PM
Dear SQL Server Team,
yes I can consistenly reproduce this behavior. Everytime I try to install SQL Server 2012 Express from our msi Setup it hangs at the same point. As soon as I try to install SQL Server from Commandline with my Configuration file it works fine. I think your investigation runs into the right direction but I can't understand why it waits for the windows installer service. With SQL Server 2008R2 Express all works fine.
Posted by dalahira on 5/15/2012 at 12:11 AM

In my case , I can reproduce this issue on demand.
I noticed that the issue also happens on attended SQLServer2012 Express editon install.
Actually I can't install SQLServer2012 Express while the Setup(Installshield 2009) is running, this behavior is different from SQLServer2008 Express installer.
Posted by Microsoft on 5/14/2012 at 1:33 PM
Hi Chris, thanks for taking the time to report this issue. Based on our investigation it appears that the SQL installer is waiting on windows installer service. Are you able to consistenly reproduce this behavior?

[SQL Server Team]
Posted by dalahira on 5/11/2012 at 4:56 AM
I'm also having the same problem. I'm using Install Shield 2009