elixir-ecto / db_connection

Database connection behaviour
http://hexdocs.pm/db_connection/DBConnection.html
309 stars 112 forks source link

Support for Azure Redirect Connection Policy #295

Closed user20230119 closed 1 year ago

user20230119 commented 1 year ago

I have an issue with Elixir TDS https://github.com/elixir-ecto/tds/issues/150 where containers on Azure connect to Azure SQL databases with a redirect connection policy.

Normally, TDS connects to the SQL server on port 1433 and will send all queries on port 1433.

With redirect,

When the connection on port 1433 closes,

Ecto queries fail if the query is

Is there a setting to keep the other port open when port 1433 closes?

josevalim commented 1 year ago

TDS is the best place to discuss this, as DBConnection is not the one establishing the actual TCP connections.