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!