SQL Server 2014 – How to Create a Server Instance with Just ComputerName

instancesql serversql server 2014sql-server-express

I'm currently hosting a database on the server MyComputerName using SQL Server Express 2014.

I want to move the database to another computer, so I installed SQL Server Express 2014 on it but that computer only has the instance ThatComputerName\SQLEXPRESS. When I try to connect to just ThatComputerName it throws the 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)

However, I can't enable remote connections on ThatComputerName because I can't even connect to that instance.

I don't remember what I did on the previous computer to allow me to connect both to MyComputerName and MyComputerName\SQLEXPRESS, how can I create that instance on the new computer? Do I have to reinstall?

Best Answer

You cannot change the Instance Name after it has been installed. But you can uninstall that SQL Server instance and reinstall as a DEFAULT instance. Ideally you should make a backup of the server, then restore the backups to the new server.

You can technically detach databases and attach again after the reinstall, but that includes the risk of losing your detached databases. See Aaron Bertrand's post:

https://blogs.sentryone.com/aaronbertrand/bad-habits-file-backups/

When installing a default instance of SQL Server Express at the Instance Configuration page, you must choose the Named Instance radio button and type in the default instance name of MSSQLSERVER.

All default instances use the MSSQLSERVER internally, but they just do not make it visible to you.