Fix SQL Server ODBC: usar alias SQLSERVER_BDUS en freetds.conf
This commit is contained in:
@@ -17,10 +17,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
# Registrar el driver FreeTDS bajo el nombre "SQL Server" (el que usa data_manager.py)
|
||||
RUN printf "[SQL Server]\nDescription = FreeTDS Driver\nDriver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so\nSetup = /usr/lib/x86_64-linux-gnu/odbc/libtdsS.so\nFileUsage = 1\n" > /etc/odbcinst.ini
|
||||
|
||||
# Configurar FreeTDS explicitamente: version de protocolo TDS, puerto y cifrado.
|
||||
# "encryption = off" evita fallos de negociacion con SQL Servers antiguos/mal configurados.
|
||||
# TDSDUMP habilita un log detallado para diagnosticar fallos de conexion.
|
||||
RUN printf "[global]\n\tport = 1433\n\ttds version = 7.3\n\tclient charset = UTF-8\n\tencryption = off\n" > /etc/freetds/freetds.conf
|
||||
# Configurar FreeTDS: global + entrada específica para el servidor SQL.
|
||||
# pyodbc busca la entrada por SERVER name en freetds.conf, por eso la definimos aquí.
|
||||
RUN printf "[global]\n\tport = 1433\n\ttds version = 7.3\n\tclient charset = UTF-8\n\tencryption = off\n\n[SQLSERVER_BDUS]\n\thost = 191.98.134.80\n\tport = 1433\n\ttds version = 7.3\n" > /etc/freetds/freetds.conf
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
Reference in New Issue
Block a user