Unable To Connect Using Pymssql With Windows Authentication
While trying to connect to MSSQL Server 2012 using pymssql, I get the following error. My server name in Windows Authentication is SARATH,User Name is Sarath\SarathShanker and I di
Solution 1:
Try this:
conn = pymssql.connect(host='myhost', database='mydb')
This is with Python Version 3.4 and for Windows Authentication.
Solution 2:
If on RHEL, try
os.environ["FREETDSCONF"] = "/etc/freetds.conf"
Solution 3:
If you are using the latest version of pymssql (I use 2.1.3),
pymssql.connect(server='<TEST_SERVER>', database='<TEST_DB>')
Simply replace the '' and '' with your server and DB name.
Post a Comment for "Unable To Connect Using Pymssql With Windows Authentication"