pgloader icon indicating copy to clipboard operation
pgloader copied to clipboard

Initialize MSSQL library when used

Open michivi opened this issue 1 year ago • 3 comments

This PR changes pgloader's behavior so that it properly initialize freetds (through cl-mssql) when working with a MS SQL Server database.

This PR relies on the functions introduced in https://github.com/archimag/cl-mssql/pull/11 (merged at the time of writing).

Before this PR, pgloader uses freetds directly without initialization. While the database copy does happen, users will see several instances of the following message:

Max connections reached, increase value of TDS_MAX_CONN

This happens because the freetds was not initialized properly. This PR initializes the library when a SQL Server is used.

Fixes #1354

michivi avatar Jan 16 '24 17:01 michivi

The debian build doesn't seem to have or pull the new cl-mssql (doesn't find the new init symbol).

svantevonerichsen6906 avatar Jan 17 '24 00:01 svantevonerichsen6906

This build issue comes from the fact that this change requires the latest version of cl-mssql, more specifically, this specific PR. That PR was only merged yesterday. So I guess, it's expected since the CI job downloads the official cl-mssql version from the Debian repository. So I guess that unfortunately, it means we'd have to wait for cl-mssql to be updated there?

michivi avatar Jan 17 '24 07:01 michivi

Hi! I'm interested in getting this merged. From what I understand all that's missing is re-triggering the debian-build action and hoping that a recent enough cl-mssql version gets downloaded?

bedaes avatar Jul 19 '24 13:07 bedaes