无法仅使用SQL身份验证从远程服务器登录 [英] Cannot log in using SQL authentication ONLY from a remote server

查看:249
本文介绍了无法仅使用SQL身份验证从远程服务器登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用用户名和密码从远程服务器连接到SQL Server 2008(我可以通过自己的计算机使用该用户名和密码正常登录-因此选择"SQL Server和Windows身份验证模式" ).
在我计算机上的SQL Server日志文件中,我看到此错误:

I am trying to connect to SQL Server 2008 from a remote server using 'sa' username and its password (I can log in normally with this username and password from my own computer - so "SQL Server and Windows authentication mode" is chosen).
In the SQL Server log file on my computer I see this error:

用户"sa"的登录失败.原因:尝试使用SQL登录 身份验证失败.服务器配置为Windows身份验证

Login failed for user 'sa'. Reason: An attempt to login using SQL authentication failed. Server is configured for Windows authentication only.

我认为这可能是一个远程连接问题,因此我检查了属性中的远程连接是否已启用,在配置管理器中启用了TCP/IP和共享管道,然后重新启动了服务,并为以下项创建了防火墙规则端口1433.我还试图关闭防火墙,以防万一它被阻止,但是我遇到了同样的错误.

I thought it might be a remote connection problem, so I checked that the remote connection in the properties is enabled, in the configuration manager I enabled TCP/IP and Shared Pipes and restarted the service afterwards and I created a firewall rule for port 1433. I also tried to turn off the firewall in case that it is being blocked somehow, but I got the same error.

仅当从远程服务器访问SQL Server时,如何显示此错误?
我该如何解决?

How this error appears only when accessing SQL Server from a remote server?
How can I fix it?

推荐答案

在SQL Server管理工作室中,在对象资源管理器"窗口中右键单击服务器(连接后),然后选择属性.

From the SQL Server management studio, right click on your server (after connect) in the Object Explorer window and choose Properties.

安全性项上,确保选择了"SQL Server和Windows身份验证"模式.

On Security item, make sure that SQL Server And Windows Authentication mode is selected.

这篇关于无法仅使用SQL身份验证从远程服务器登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆