Closed zinzh closed 1 year ago
'librarycheck' passes on the both the images from
docker pull tpcorg/hammerdb:mssqls
Also the library /opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.2.so.2.1 is present in both of these images
@pooja-jain-17 Yes, but the path to the driver in /usr/local/unixODBC/etc/odbcinst.ini
is still pointing to an older version which is causing the error
@zinzh Thanks for pointing this.
I see what you are saying.
We have
Driver=/opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.1.so.2.1
as opposed to
Driver=/opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.2.so.2.1
Please go ahead and create a pull request if you would like and we can incorporate it.
You will need to edit this particular code in the Dockerfile
echo "[ODBC Driver 18 for SQL Server] \n\
Description=Microsoft ODBC Driver 18 for SQL Server \n\
Driver=/opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.1.so.2.1 \n\
UsageCount=1 " >> /usr/local/unixODBC/etc/odbcinst.ini && \
We can also incorporate your earlier suggestion of installing the specific msodbcsql18 version 18.2.2.1-1 so everything is consistent.
Thanks,
I will open a PR with the fix i suggested so that we do not face the issue again when a new version is released from microsoft and gets automatically selected for installation, thanks @pooja-jain-17
Description Hammerdb CLI in container in MSSQLS mode not finding MSSQL ODBC drivers
To Reproduce
Expected behavior Can connect to the DB and build the schema
Screenshots
HammerDB Version HammerDB v4.8
HammerDB Interface
Operating System (please complete the following information): HammerDb CLI in container (base image Ubuntu 20.04)
Database Server (please complete the following information): 15.0.4316
Database Client (please complete the following information): Based on container image
Additional context In MSSQL Dockerfile, msodbcsql18 is being installed without specifying a version, however, in the same Dockerfile the line Driver=/opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.1.so.2.1 is being added in /usr/local/unixODBC/etc/odbcinst.ini with a specific version .
Installing msodbcsql18 with specific version 18.1.2.1-1 solves the issue since a newer version has been released from microsoft (18.3.1.1-1)
Replacing
ACCEPT_EULA=Y DEBIAN_FRONTEND=noninteractive apt-get install -y msodbcsql18 && \
withACCEPT_EULA=Y DEBIAN_FRONTEND=noninteractive apt-get install -y msodbcsql18==18.1.2.1-1 && \