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?

Thanks

link|improve this question
feedback

2 Answers

up vote 7 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

link|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
feedback

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.

http://social.msdn.microsoft.com/Forums/en-US/sqlexpress/thread/9541a5b7-658d-42b1-85ee-110ba61aa28a/

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.