7

I'm using Visual Studio 2010 and SQL Server 2012. When I try to connect to SQL Server through Visual Studio, I don't get my server name on Add connection drop down menu.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
user3786234
  • 115
  • 1
  • 1
  • 12

5 Answers5

24

Go to SQL Server Management Studio to look for the correct Server Name and copy the value. Make all the configurations by yourself at the end just click Test connection button. If the connection is test successfully proceed with your work.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
mybirthname
  • 17,949
  • 3
  • 31
  • 55
  • 1
    @mybirthname Does this look familiar, someone liked your answer enough to copy it word for word! http://stackoverflow.com/a/32823665/1663001 – DavidG Oct 29 '15 at 12:06
15

If the database is in your local machine, Just put a . (Dot) in Server Name and select the database.

Add connection dialogue

Satyajit
  • 2,150
  • 2
  • 15
  • 28
3

run services.msc find " SQL server browser " , it might be disabled , start that service and set it to automatic.

Divyansh
  • 61
  • 6
1

Insert machine_name/SqlServerName

Jsperk
  • 124
  • 1
  • 11
0

For people using sql server 2014+ and using the local db on your pc. simply set the server name to be (localdb)\ name of your database. It worked for me.

Moataz Alsayed
  • 381
  • 2
  • 12