首页 > 解决方案 > iAnywhere.Data.SQLAnywhere.SAException 连接错误:连接已断开(可能不是 SQL Anywhere 服务器)

问题描述

尝试从 Azure ServiceFabric 连接到 SQLAnywhere (Sybase) 数据库(C# 代码)时:

await using var connection = new SAConnection(connectionString);
await connection.OpenAsync();

接收 iAnywhere.Data.SQLAnywhere.SAException

Connection error: Connection was dropped (may not be a SQL Anywhere server)

错误代码是错误 832。这是一般连接错误An error occurred while attempting to establish a connection with the database server, but before attempting to connect to a database. Failure to initialize a communication link during the connection attempt is an example of this error. Creating a debug log file using the LogFile connection parameter may provide more information.

在本地它可以工作,但不能在 Service Fabric 上工作。

修复想法尝试:

  1. 缺少司机?看起来没有,Sybase(现在是 SAP)SQLAnywhere 需要特殊的驱动程序或客户端 - 但在本地也可以在没有此驱动程序的情况下工作,只需安装 iAnywhere.Data.SQLAnywhere.NETCore nupackage
  2. 网络连接/防火墙问题?看起来没有,可以从 Service Fabric 节点 ping 数据库服务器

标签: .net-coresybaseazure-service-fabricsqlanywhere

解决方案


这是另一种交通保护工具。虽然可以远程登录端口,但来自应用程序的流量仍然被另一个工具阻止。


推荐阅读