gpt4 book ai didi

azure - 添加本地 SQL Server 连接时如何对 Azure Data Studio "error occurred during the pre-login handshake"进行故障排除?

转载 作者:行者123 更新时间:2023-12-03 02:14:36 24 4
gpt4 key购买 nike

Azure Data Studio 版本 1.35.1 安装在运行 macOS Monterey 版本 12.3.1 的 MacBook Pro 上。以下是我生成此错误所采取的步骤。

  1. 在“帐户”中,我添加了一个通过“Azure Active Directory - 具有 MFA 支持的通用”进行身份验证的 Windows Server 域级别帐户。
  2. 然后,在“连接”下,我点击“添加连接”以添加与本地 SQL Server 的新连接。
  3. 连接类型:Microsoft SQL Server;服务器:myDB.servers.myComp.org;身份验证类型:Azure Active Directory - 通用,支持 MFA;账号:我的[email protected] ;其余选项我留空。
  4. 我点击了“连接”按钮,下面是我收到的错误。

Microsoft.Data.SqlClient.SqlException (0x80131904): A connection wassuccessfully established with the server, but then an error occurredduring the pre-login handshake. (provider: TCP Provider, error: 35 -An internal exception was caught)

我无法在连接详细信息中使用“Windows 身份验证”下拉选项作为身份验证类型,因为我是使用常规帐户登录的,而不是有权访问 SQL Server 实例的 Windows Server 域帐户。我们的 SQL Server 实例配置为仅允许 Windows Server 域级别帐户。我们的 Windows Server 配置为使用 MFA,但我们的 SQL Server 实例未配置。

最佳答案

请尝试在高级属性/连接字符串末尾将连接上的“TrustServerCertificate” 连接属性设置为“true”。

  1. 您可能会遇到问题的原因是您可能丢失了Windows 级别或内部的 TLS 握手过程中的证书VPN 配置未安装证书。

  2. 另请尝试将连接超时增加到更大的值。

    ....Encrypt=True;TrustServerCertificate=True;连接超时=30;

enter image description here

引用文献:

  1. azuredatastudio issues(github)
  2. azuredatastudio issues

其他解决方法:

  1. 如果仍然遇到问题,请尝试将加密值从 True 更改为 False

  2. 确保 TCP/IP 已作为客户端协议(protocol)启用应用程序服务器,如果出现问题,请尝试升级到/启用TLS 1.2 或 TLS 1.0

  3. 检查端口号为 1433 并确保服务器名称完整连接字符串中的限定。

  4. 最后尝试将服务器更改为旧版本并重试。

另请参阅Troubleshoot common connection issues

sql server - Can Microsoft SQL Operations Studio be used to access MYSQL database on Mac? - Stack Overflow

关于azure - 添加本地 SQL Server 连接时如何对 Azure Data Studio "error occurred during the pre-login handshake"进行故障排除?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71926677/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com