Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed VS2010 and it automatically installed SQL Server 2008 Express.

Now, the installed instance is called SQLEXPRESS, therefore to connect to it I have to use 'localhost\SQLEXPRESS' or '.\SQLEXPRESS' or something like that.

I want to rename the instance so I can connect using only my computer name or 'localhost'.

How do I do this?


share|improve this question
up vote 11 down vote accepted

There is no way you can rename an instance of SQL Server. You can probably create a new instance with just the machine name so that it suits you requirements.

I'm not sure of the express version of SQL Server bundled with VS 2010, but with the Standalone SQL Express 2008 (or R2), running the setup again will let you create a new instance.

enter image description here

share|improve this answer
+1 You will need to re run the setup (this will create a new instance of SQL Server) and make sure that you select the Default Instance. This will allow you to connect without specifying any name or juts a '.' – Ganesh R. Jun 30 '11 at 6:49
Thanks, I ended up uninstalling the previous version and installing it again. – willvv Jul 1 '11 at 16:26

I was always under the very strong impression (I am only questioning it a little for the first time due to the conflicts in the link below) that you can only do that by reinstalling SQL (I have always had to create additional instances with an additional install anyway), and choosing a new instance name. I found the link below on a Microsoft SQL Server forum that has a very divided opinion. I side with the Microsoft MVP moderator, because I think that the attempted change only changes the server name though.

I would follow the advice of detaching the databases, reinstall SQL with the new instance name, and then reattach. That is guaranteed to work.

share|improve this answer

I followed the procedure mentioned in this

For default instance

sp_dropserver 'old_name'
sp_addserver 'new_name','local'

For named instance

sp_dropserver 'Server Name\old_Instance_name'
sp_addserver 'ServerName\New Instance Name','local'

and then restarted the SQL server.

Now I'm able to connect to both default instance and SQLExpress

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .