Take the 2-minute tour ×

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
add comment

3 Answers

up vote 8 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
add comment

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
add comment

I followed the procedure mentioned in http://sqldbpool.com/2008/09/03/how-to-change-sql-server-instance-name/like 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
add comment

Your Answer


