简体   繁体   English

Visual Studio,Server Explorer无法建立与Microsoft SQL Server的连接

[英]Visual Studio, Server Explorer Cannot Establish Connection to Microsoft SQL server

在此输入图像描述 I have installed VS Community 2015 and try to establish connection to a SQL Server that is installed locally in my pc. 我已经安装了VS Community 2015并尝试建立与我的电脑本地安装的SQL Server的连接。 When I try to connect to the SQL Server via Data Connection in the Server Explorer, it does not connect. 当我尝试通过服务器资源管理器中的数据连接连接到SQL Server时,它无法连接。 Any suggestion? 有什么建议吗? <add name="BaseDB" providerName="System.Data.SqlClient" connectionString="Server=OLDKGL202146;Database=XXXXXXXXXX;User id=test;pwd=fatboy;Connection Timeout=60" /> </connectionStrings> that is how my connection sting looks like and the SQL DB looks from SQL Management Studio. <add name="BaseDB" providerName="System.Data.SqlClient" connectionString="Server=OLDKGL202146;Database=XXXXXXXXXX;User id=test;pwd=fatboy;Connection Timeout=60" /> </connectionStrings>这是怎么回事我的连接sting看起来像SQL DB从SQL Management Studio看起来。

在此输入图像描述

Did you enable the mixed mode authentication? 您是否启用了混合模式身份验证?

Did you restart SQL services after changing the mixed mode authentication? 更改混合模式身份验证后,您是否重新启动了SQL服务?

Start - > View Local Services -> SQL Server(SQLEXPRESS) > restart it 开始 - >查看本地服务 - > SQL Server(SQLEXPRESS)>重新启动它

Some of the server level properties takes only after a SQL restart , one such is authentication modes. 某些服务器级属性仅在SQL重新启动后才会执行,其中一种是身份验证模式。

Through Sql server management studio make sure what kind of Authentication is being used and that you can login from SSMS. 通过Sql server management studio确保使用哪种身份验证,并且可以从SSMS登录。 If you can't login even with SSMS open Configuration Manager and in services make sure your instance (for ex. SQLEXPRESS) is Running. 如果即使使用SSMS打开Configuration Manager也无法登录,并且在服务中确保您的实例(例如SQLEXPRESS)正在运行。 If not then restart the service. 如果没有,则重启服务。 And then try connecting to the server via Visual studio. 然后尝试通过Visual Studio连接到服务器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM