Is there any way to change the instance name of LocalDB of SQL Server 2012 from (LocalDB)\xxxx to just xxxx?

I need it for an application that needs SQL Server DB instance name to be MSSQLDEFAULT.

  • No @PreetSangha this is not dup, because after renaming the instance, LocalDB keeps (LocalDB) as a prefix to instance name. Thank you anyway. – AVEbrahimi Jun 10 '13 at 4:41
  • 2
    Shouldn't your application be flexible? Changing a config file when moving between machines should be easy - if you are hard-coding the instance name inside the application code, that's bad news. – Aaron Bertrand Jun 10 '13 at 12:48
  • You can refer to this article, davidbreyer.com/programming/2016/06/20/… – Jeffrey Fan Apr 17 '18 at 7:59

No, there is no way to remove the (LocalDB)\ prefix from LocalDB instance names. LocalDB, which is a user-process, operates differently than "regular" SQL Server which normally operates as an NT service. So, at least in terms of client connectivity libraries / software goes, that (LocalDB)\ prefix is actually functional: it directs the client to another, LocalDB-specific, DLL for the connectivity. That LocalDB-specific DLL handles things such as looking for the existence of a currently running process for the instance being requested, and if not present, then it will actually start that instance and then connect to it (end result being that it just works).


Have you looked into creating an alias via Native Client Configuration? You would need to do this on every client computer that connects to the server. If you have only a few computers that connect to the server (a few web servers, maybe a devops workstation), then this isn't a big deal. There is a ServerFault question covering this topic.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy