From an Ubuntu 20.x
machine, using this program to connect to a SQL Server
machine under Windows 2019 Sever
:
import pyodbc
from sqlalchemy import create_engine
if __name__ == "__main__":
print(pyodbc.drivers())
constr = 'mssql+pyodbc://domain_name\uname:pwd@xxx.xx.xx.xx:1433/db?Trusted_Connection=yes&driver=ODBC Driver 17 for SQL Server'
engine = create_engine(constr)
connection = engine.connect()
I get this exception:
sqlalchemy.exc.DBAPIError: (pyodbc.Error) ('HY000', '[HY000] [Microsoft][ODBC Driver 17 for SQL Server]SSPI Provider: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000) (851968) (SQLDriverConnect)') (Background on this error at: https://sqlalche.me/e/14/dbapi)
This is a single machine. There is no Active Directory
or Kerberos
, etc.