Visual Studio not showing server name when adding

2020-07-13 11:45发布

问题:

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.

回答1:

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.



回答2:

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



回答3:

Insert machine_name/SqlServerName



回答4:

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



回答5:

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.