【发布时间】:2021-04-23 18:03:17
【问题描述】:
尝试从 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。This is generic connection error: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 中不起作用。
已尝试修复想法:
- 缺少驱动程序?看起来没有,Sybase(现在是 SAP)SQLAnywhere 需要特殊的驱动程序或客户端 - 但在本地也可以在没有此驱动程序的情况下工作,只需安装 iAnywhere.Data.SQLAnywhere.NETCore nupackage
- 网络连接/防火墙问题?好像没有,可以从 Service Fabric 节点 ping 数据库服务器
【问题讨论】:
标签: .net-core sybase azure-service-fabric sqlanywhere