Below is the traceback. I've read all the other SO threads, googled for over two hours, and cannot figure this out. Here is what I have tried:
- Both SQL Authentication and Windows Authentication versions of the connection string.
- Using the SQL Server name (text) and also the IP Address of the server
- Including and Excluding port 1443 (the default tcp/ip port for the SQL server)
- Creating new rules in Windows Firewall to allow both inbound/outbound TCP at port 1443
List item
Traceback (most recent call last): File "pythonscript.py", line 75, in conn = pyodbc.connect(driver='{SQL Server}', server='ipaddress,1443', database='master', uid='XYZ\login', pwd='password') pyodbc.Error: ('08001', '[08001] [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. (17) (SQLDriverConnect); [01000] [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). (53)'
here are some examples of what I've tried for the connection string:
conn = pyodbc.connect('Trusted_Connection=yes', driver = '{SQL Server}',server = '1.1.1.1,1443', database = 'master')
then
conn = pyodbc.connect(driver='{SQL Server}', server='1.1.1.1,1443', database='master', uid='xyz\login', pwd='pwd'
then I also tried both of the above with the name of the server (text) rather than the IP address. I have no idea how to get this to work at this point.