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.
Asked
Active
Viewed 2.8k times
7
-
4u need to add it yourself – Rotem Varon Oct 25 '14 at 06:23
-
2If the DB is running on the localhost, just type the machine name – Rotem Varon Oct 25 '14 at 06:23
-
SQL server 2012 is running on your PC or different server? – Damith Oct 25 '14 at 06:24
-
add snapshot of connected to SQL SERVER Management Studio – Dgan Oct 25 '14 at 06:24
5 Answers
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.

Satyajit
- 2,150
- 2
- 15
- 28

Venkataraghavan Yanamandram
- 431
- 3
- 18
-
This dot solution is great! Much easier then (local)/servername – Joren Vandamme Jan 11 '17 at 14:07
3
run services.msc find " SQL server browser " , it might be disabled , start that service and set it to automatic.

Divyansh
- 61
- 6
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