Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Can the default instance name be something other than (local) or (machinename)? For example, if my server is called Apple, and I install SQL Server 2008 and choose to create a default instance and name it Orange, will this work? Will I then be able to use a connection string that is "Database=Orange" from another server?

The end goal: I have a lot of DBs on a server Apple, and want them to all be moved to a new server Orange - is there a way of doing this without breaking all the connection strings that currently reference Apple?

I'm guessing the answer to all of this is no and that makes sense, but I'm hoping I'm wrong.

share|improve this question

There's no way I know of to do this. The default instance is always the name of the computer that is running SQL Server.

However, you can create an alias for the server on the client machine. You can create a registry key on the client like this:


This will point any calls to Apple to the Orange server.

share|improve this answer
Technically, all instance names are of the form MACHINENAME\INSTANCENAME, and the default instance's name is always MSSQLSERVER. Referring to an instance by the machinename is just an abbreviated form for when the instance name is MSSQLSERVER. There is no way to change that. Brian's technique to remap names would work to re-point all of your connection strings to the new server, but keep in mind that this has to be done on each and every client that accesses the database. – Ed Leighton-Dick Feb 22 '10 at 19:09
Spot on Ed - you are entirely correct! :) – Brian Knight Feb 22 '10 at 19:15

This is totally possible using DNS or client aliases. We actually prefer to give each instance a dedicated DNS alias to use (say APP1.COMPANY.COM is a CNAME record to SERVER1.COMPANY.COM) so that when I want to move SERVER1.COMPANY.COM the default instance installed on this server I can just install on the new server, backup and restore the databases, then point the CNAME record from SERVER1.COMPANY.COM to SERVER2.COMPANY.COM and the client never knows the difference. In the case of a named instance it would work the same way, the client would be using APP1.COMPANY.COM\INST1 to point to SERVER1.COMPANY.COM\INST1 and the same case would be true.

To make sure that the logins are moved you will want to look into using sp_help_revlogin (search for it) to export/import the instances users, or restore the master database.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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