Sql-server – Sql Server 2017 Developers Edition install failure during configuration

installationsql serversql-server-2017

When installing SQL Server 2017 Developers Addition, the install would get to the point where it needed to connect to the service to configure the users (and whatever else it does), and it would fail to connect.

This is my development machine, and I had uninstalled other versions of SQL Server (2016, 2014, 2012, 2008 R2) previously and rebooted. I tried removing C++ 5 and 7 shared component. I uninstalled SSMS. I completely deleted Sql Server in Program Files and Program Files (x86). I could not figure it out.

Best Answer

I never solved it, but here is how I worked around it.

I don't know if it was necessary, but I started with SSMS and all previous versions of Sql Server uninstalled, as well as the Visual Studio C++ shared components (versions 2015 and 2017), and had deleted the Sql Server directories.

I was installing the database as the user I wanted to be the admin user. When I ran the install, I right clicked and ran as admin. When the installer asked for the admin user, I used the "Add Current User" button to add myself.

It still failed when trying to connect to configure the database. However, the Configuration Manager had already been installed (in the Start Menu). So I ran that, right clicked on the Service to get to properties, found the command line switches, and added -m to start the service in single user mode. Because I had ran the installed as admin, that invokes the backdoor to allow a local admin user to connect without checking credentials, so the install script could configure the database and add the users. After installation was complete, I removed the -m switch using the configuration manager, restarted the service, and had a running instance of the database.

I hope nobody ever has to go through that again, but if you do, that's what worked for me.