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.