1

I can use pymssql to connect to SQLServer using Windows Authentication:

conn = pymssql.connect(host='..', database='..', trusted=True)

But how could I use SQLAlchemy to connect to SQLServer using Windows Authenticaton with pymssql driver?

The example given by SQLAlchemy is:

mssql+pymssql://<username>:<password>@<freetds_name>

Since I use Windows Authentication, I cannot manually set the username and password.

Mark Ma
  • 1,342
  • 3
  • 19
  • 35

1 Answers1

0

I do not have pymssql to check, but try the version below:

mssql+pymssql://<freetds_name>?trusted=True
van
  • 74,297
  • 13
  • 168
  • 171