Try Now
More in this section

Forums / Developing with Sitefinity / Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.

Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.

3 posts, 0 answered
  1. Duncan Evans
    Duncan Evans avatar
    122 posts
    07 Jul 2009
    08 Jul 2010
    Link to this post
    I recently upgraded my production server to Windows Server 2008 R2 64bit with SQL Server Express 2008 R2 installed on it (all seemed fine with this). This forced me to have to upgrade my development machine to SQL Server Express 2008 R2 in order to handle the new database version. The production server does not produce any SQL errors and works fine; these errors are strictly on my development machine which is running Windows 7 64bit and Visual Studio 2008 SP1 which of course throws SQL Express 2005 on there.

    First I attempted to upgrade the 2005 install to 2008, doing this produced errors that forced me to uninstall SQL 2005 and 2008 and attempt to perform a fresh install on SQL Server 2008 R2. I have exhausted all options that I have found online regarding this error with no success. Posting here is my last resort to get this resolved without wiping the entire machine!
    The error I am getting when attempting to run my Sitefinity driven websites is: Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.

    Now there seem to be many “simple” solutions to this problem online, and like I mentioned, I have exhausted all of them.

    Solution 1 was to find a directory for SQLEXPRESS and delete it: "C:\%USERPROFILE%\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS" or “C:\Users\%USERPROFILE%\AppData\Local\Microsoft\Microsoft SQL Server\SQLEXPRESS”. However, no such directory exists for me!

    Solution 2 was to completely uninstall SQL Server and delete all remaining directories and registry keys. After reinstall the problem persists.

    Solution 3 was to open the SQL Server Config Manager and switch the “log on as” account from NETWORK SERVICE to LOCAL SYSTEM. No change by doing this.

    Solution 4 was to add a timeout to the connection string in the web.config file of the website I am attempting to run. According to one post this would give the server some time to log on and add the application database to the MASTER SQL database. The solution failed also.

    There are many other solutions that include opening the SQL Server Management Studio and changing configuration setting there. However, I am unable to log on the SQL instance from the Management Studio. When I attempt to connect to the “local” SQL Server I get the following error:

    A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (Microsoft SQL Server, Error: 2)

    Yes I know, how much more vague can you get! I have attempted countless server names and instance names; still I am unable to connect to the SQL server via the Management Studio.

    So before I completely wipe this dev machine clean and start from scratch, I would like to know if anyone has a possible solution to my problem here.

    Also I would like anyone who knows to let me know if there is a procedural way of installing Visual Studio 2008 WITHOUT it installing SQL SERVER 2005. I need 2008 on my dev machine now and it is fairly obvious that the upgrade process from 2005 to 2008 has royally screwed me.

    Where do I go from here? Any help would be greatly appreciated!

  2. Todd Bush
    Todd Bush avatar
    5 posts
    07 Oct 2009
    31 Aug 2010
    Link to this post
    I am also experiencing this problem. Was it ever resolved?

    I was able to connect to the SQLExpress instance in SQL Server Management Studio by changing "(local)" to "{computer name}\SQLEXPRESS".

    However, I continue to receive the same error Duncan does trying to launch Administration for a sitefinity site.


  3. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    01 Feb 2016
    01 Sep 2010
    Link to this post
    Hi Duncan,

    Thank you for using our services.

    This error is thrown if your SQL server is not set up to allow Named Pipes. First you can check the instance name of your SQL Server by running the SQL Server Configuration Manager. This will give you a list of the instances running on your SQL Server as well as check host names. I have encountered this error before and I found the resolution in this blog post.
    All the best,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
3 posts, 0 answered