sqlcmd not working
Summary
Unable to use sqlcmd in current image. This is the error from Gitlab CI/CD Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : Can't open lib 'ODBC Driver 18 for SQL Server' : file not found.
Steps to reproduce
Attempt to connect to DB using sqlcmd, here is our example:
kubectl exec "pod_name" -n "NAMESPACE" --
/opt/mssql-tools18/bin/sqlcmd -U"db_user" -P"db_pw" -S127.0.0.1 -Q"BackupDB"
What is the current bug behavior?
Sqlcmd: Error: Microsoft ODBC Driver 18 for SQL Server : Can't open lib 'ODBC Driver 18 for SQL Server' : file not found.
Troubleshooting by the Ektropy team found that all the necessary packages exist in: /opt/microsoft/msodbcsql18/*
Possible file corruption, service not enabled/started by default, missing dependencies.
What is the expected correct behavior?
This same script worked in previous known good images.
Relevant logs and/or screenshots
https://gitlab.health.mil/dsocc-paas/ektropy/backup-script/-/jobs/3128110
Possible fixes
Tasks
-
Bug has been identified and corrected within the container
Please read the Iron Bank Documentation for more info