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
  • 704,970
  • 168
  • 1,303
  • 1,425
user3786234
  • 115
  • 1
  • 1
  • 12

5 Answers5

23

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
  • 704,970
  • 168
  • 1,303
  • 1,425
mybirthname
  • 17,539
  • 3
  • 30
  • 53
  • @user3786234 you are welcome. You can accept the answer to finish with this question. – mybirthname Oct 25 '14 at 07:00
  • 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
13

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

Add connection dialogue

Satyajit
  • 1,880
  • 2
  • 12
  • 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
  • 127
  • 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
  • 371
  • 2
  • 11