0

After I installed SQL 2012 Express, I can't connect to localhost or (local) to local server.

I have to put my computername/instance name in order for me to connect to server.

Can anyone help me with this?

LittleBobbyTables - Au Revoir
  • 32,008
  • 25
  • 109
  • 114
user2502947
  • 69
  • 1
  • 4

1 Answers1

6

You can't change a named instance to a default instance without reinstalling SQL Server. You can perhaps fool it with client network aliases and/or port redirection, but wouldn't it be just as easy to specify one of the following when connecting?

YOUR_PC_NAME\SQLEXPRESS

localhost\SQLEXPRESS

(local)\SQLEXPRESS

.\SQLEXPRESS
Aaron Bertrand
  • 272,866
  • 37
  • 466
  • 490
  • 3
    @user2502947 this has nothing to do with 2005, 2008 or 2012. If you could use (local) or localhost before, it's because you had a default instance. Now you don't, so you can't. If you installed 2008 with an instance named SQLEXPRESS you wouldn't be able to use (local) or localhost now either. – Aaron Bertrand Aug 15 '13 at 14:01
  • 1
    oh... I see. It's cause my instance is not default. I thought I did. Okay. Good to know. Thanks for the info! – user2502947 Aug 15 '13 at 14:21
  • If the instance name is MSSQLSERVER then it is the default name so I do not have to put anything there right? – user2502947 Feb 07 '20 at 03:54
  • @user2502947 Correct, if it's `MSSQLSERVER` then it's the default instance, so you do not need to specify a name. `YOUR_PC_NAME` or `localhost` or `(local)` or `127.0.0.1` or `.` will do. If it doesn't work, you'll need to be more specific than "isn't working" - what is the _exact_ error message? – Aaron Bertrand Feb 07 '20 at 16:38