Hi,
I am an Test Automation Engineer. We are using Python as Scripting language using pymssql in Windows. Form Python, we need to connect to our Application DB which is Azure SQL. I searched and found that we need to use Free TDS to connect with Azure Database. However, i could not find the steps for installing, configuring Free TDS and how that will be used with pymssql. Please help me considering as a newbie.
What I have done so far:
2. Below is the settings in Free TDS Config file located at C:\FreeTDS\etc
[global]
host = localhost
instance = .
port = 1433
client charset = UTF-8
dump file = C:\FreeTDS\etc\freeTDS.log
tds version = 8.0
text size = 20971520
3. Now used the below in my Python code
import pymssql
conn = pymssql.connect(
port=1433,
user="username@xxx",
password="password",
database="dbname")
cursor = conn.cursor()
cursor .execute("select * from TableName")
But I am getting error
File "pymssql.pyx", line 580, in pymssql.connect (pymssql.c:9055)
InterfaceError: Connection to the database failed for an unknown reason.
Kindly let me know where Im doing wrong
Thanks in advance
Regards,
Anil Kumar