连接到我的所有 SQL 服务器时出错

发布于 2024-08-21 05:46:39 字数 497 浏览 5 评论 0原文

当我尝试从 Windows XP 上的 SSMS 连接到任何 SQL 服务器(25+)时,我突然开始收到此错误。当我昨天下班时,一切都工作正常,今天早上回来,我开始得到这个。尝试重新启动我的电脑,但这显然没有解决问题。我的同事都可以正常连接。搜索了一个解决方案,但我发现的所有内容都与 .NET 应用程序的加密有关。不知道如何将其应用到 SSMS。 替代文本 http://picasaweb.google.com/lh/photo/-l9VrFuYXk-A80NzZ1kzng? feat=directlink

由于某种原因,图像无法工作,因此错误如下:

已成功与服务器建立连接,但在登录前握手期间发生错误。 (提供程序:SSL 提供程序,错误:0 - 证书链由不受信任的机构颁发。)(Microsoft SQL Server)

I suddenly started getting this error when trying to connect to any of my sql servers (25+) from SSMS on Windows XP. When I left work yesterday everything was working fine, came in this morning, and I started getting this. Tried rebooting my pc but that obviously didn't fix it. My co-workers can all connect just fine. Searched for a solution but everything I found was regarding encryption in regards to .NET applications. Not sure how to apply that to SSMS.
alt text http://picasaweb.google.com/lh/photo/-l9VrFuYXk-A80NzZ1kzng?feat=directlink

For some reason the image won't work so the error is this:

A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: SSL Provider, error: 0 - The certificate chain was issued by an authority that is not trusted.) (Microsoft SQL Server)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

懷念過去 2024-08-28 05:46:39

问题似乎已经得到解答,但我想插话。对于某些提供程序,例如 SQL Server,连接字符串中有一个参数,即使证书未知,也可以让您连接到加密的服务器:“TrustServerCertificate= True”,因此,如果您将其包含在连接字符串中,您将进行加密连接和工作,而不必运行非加密连接。

The question seems to have been answered, but I wanted to chime in. For some providers, such as SQL Server, there is a parameter in connection string which lets you connect to server encrypted even if certificate is unknown: "TrustServerCertificate=True", so if you include that in a connection string, you will connect and work encrypted, and will not have to run connection non-encrypted.

逆光下的微笑 2024-08-28 05:46:39

试试这个...

如果您失去了与所有远程服务器的连接并且您的同事都很好,那么这一定是客户端问题。您可能会“点击”并无意中更改了一些设置。

打开您的客户端网络实用程序(我的位于:C:\WINDOWS\system32\cliconfg.exe)。
在“常规”选项卡下,查看禁用的协议。它们都应该未选中“强制协议加密”。如果检查其中任何值,则您的本地 SSMS 可能会尝试强制加密连接并失败。

如果这不起作用请报告,我会再研究一下。

Try this...

Its gotta be a client issue if you lost connection to all your remote servers and your coworkers are fine. You probably got "clicky" and changed some settings inadvertantly.

Open your client network utility (mine is here: C:\WINDOWS\system32\cliconfg.exe).
Under the General Tab, check out the disabled protocols. They should all have "force protocol encryption" unchecked. If this is checked for any of those values, your local SSMS is probably trying to force an encrypted connection and failing.

Report back if this doesn't work, and I'll poke around a bit more.

最近可好 2024-08-28 05:46:39

在连接窗口中使用MS SQL Server Management Studio进行连接时,转到选项->连接属性并选中复选框信任服务器证书
输入图片此处描述

When connecting using MS SQL Server Management Studio in the connect window go to Options->Connection Properties and check checkbox Trust server certificate
enter image description here

空城仅有旧梦在 2024-08-28 05:46:39

您连接到请求加密连接的 SQL Server,但您不信任这些服务器使用的证书。为什么会发生这种情况取决于多种原因。

  • 您的服务器使用自签名证书还是 PKI 颁发的证书?
  • 为您颁发证书的 PKI 机构是谁?是企业证书服务吗?
  • 您的计算机信任 PKI 根权限吗?

如果您不知道答案,则必须联系您的网络和安全管理员。简单地禁用客户端的协议强制要求可能会违反公司策略,或者服务器可能会强制执行 SSL,而不管您的本地设置。

这些都是您应该询问自己的环境管理员的问题,而不是公共论坛。您应该尝试解决问题,而不是想方设法解决问题并最终得到不兼容的机器。

You connect to your SQL Servers requesting encrypted connections and you don't trust the certificate(s) used by those servers. Why that happens depends on a myriad or reasons.

  • Do your servers use self-signed certificates or PKI issued certificates?
  • Who is the PKI authorithy that issued your certificates? Is it a corporate certificate service?
  • Does your computer trust the PKI root authority?

If you don't know the answers to this, you must contact your network and security administrators. Simply disabling protocl enforcing requirement from your client may be against corporate policy, or the servers may enforce SSL anyway disregarding your local setting.

These are all questions you should ask your own environment admins, not public forums. You should try to solve the issue, not hack your way arround it and end up with a non-compliant machine.

怪我太投入 2024-08-28 05:46:39

从这个链接:

禁用客户端强制加密
在服务器上。在机器上
运行SQL Server实例,打开
SQL Server 配置管理器,
右键单击 SQL Native Client
配置,并设置强制协议
加密为No。然后尝试连接
本地。

http://blogs.msdn.com/sql_protocols/archive/ 2005/12/22/506607.aspx

From this link:

Disable client-side Force Encryption
on the server. On the machine that
runs the SQL Server instance, open up
the SQL Server Configuration Manager,
right-click SQL Native Client
Configuration, and set Force Protocol
Encryption to No. Then try connecting
locally.

http://blogs.msdn.com/sql_protocols/archive/2005/12/22/506607.aspx

山有枢 2024-08-28 05:46:39

我收到此错误,我尝试连接 MS Cloud 中的远程服务器 SQL (SaaS)
我在 Azure 门户中添加了一条新的防火墙规则,其中包含我的客户端 IP,这解决了我的问题

I got this error, I tried to connect a remote server SQL (SaaS) in MS Cloud
I added a new firewall rule in Azure portal with my client IP that solved my issue

血之狂魔 2024-08-28 05:46:39
  • 打开命令提示符:按 Windows 键+ R,然后键入 cmd 并运行
  • 输入:

    runas /user:[YourDomainName]\[YourActiveDirectoryUserName] /netonly cmd

  • 输入您的 Active Directory 密码并按 Enter

  • 在新命令窗口中输入您的 SSMS.exe 路径,并带有双引号,例如:

"C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\ ssms.exe”

  • 然后使用windows认证登录
  • Open Command Prompt: press Windows Key+ R then type cmd and run
  • Enter this:

    runas /user:[YourDomainName]\[YourActiveDirectoryUserName] /netonly cmd

  • Enter your active directory password and press enter

  • In New Command Window enter your SSMS.exe Path with double cotation like:

"C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\Ssms.exe"

  • Then login with windows athentication
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文