I am using mssql_python against an on-prem SQL Server using a domain-style username DOMAIN\username but with a password.
The same server, database, username and password work when using pyodbc with the FreeTDS ODBC driver, but fail with mssql_python. The error message is
mssql_python.exceptions.OperationalError: Driver Error: Invalid authorization specification; DDBC Error: [Microsoft][SQL Server]Login failed for user 'DOMAIN\username'.
To reproduce
This code below works:
import pyodbc
s=r"DRIVER=FreeTDS;SERVER=servername;PORT=1433;DATABASE=DM_Database;UID=DOMAIN\username;PWD=J...;TDS_Version=7.4;Encrypt=yes"
conn = pyodbc.connect(_s)
This code below fails with the message reported above:
import mysql_python
s = r"SERVER=servername,1433;Database=DM_Database;UID=DOMAIN\username;PWD=J...;Encrypt=yes;
conn = mssql_python.connect(s)
Further technical details
Python version: 3.10.12
mssql_python: 1.8.0
SQL Server version: SQL Server 2022 (Must be verified, but this is what my documentation says)
Operating system: Ubuntu 22.04.5 LTS
I am using
mssql_pythonagainst an on-prem SQL Server using a domain-style usernameDOMAIN\usernamebut with a password.The same server, database, username and password work when using
pyodbcwith the FreeTDS ODBC driver, but fail withmssql_python. The error message isTo reproduce
This code below works:
This code below fails with the message reported above:
Further technical details
Python version: 3.10.12
mssql_python: 1.8.0
SQL Server version: SQL Server 2022 (Must be verified, but this is what my documentation says)
Operating system: Ubuntu 22.04.5 LTS