I for some reason can't seem to connect to any SQL Server that is outside of our network, yet have no problem if I'm within the network via VPN. My code is as such for local connection:
sql = pyodbc.connect(
'DRIVER={FreeTDS};'
'SERVER=192.168.1.xx\ROA;'
'DATABASE=RentalDB;'
'UID=xxxxxxx;'
'PWD=xxxxxxx'
)
and the following is what I'm trying for remote:
sql = pyodbc.connect(
'DRIVER={FreeTDS};'
'SERVER=69.178.xx.xx/ROA;'
'DATABASE=RentalDB;'
'UID=xxxxxxxx;'
'PWD=xxxxxxxx'
)
When trying to connect, I am thrown the following error after about 15 seconds or so:
pyodbc.Error: ('08001', '[08001] [unixODBC][FreeTDS][SQL Server]Unable to connect to data source (0) (SQLDriverConnect)')
I'm able to successfully connect via SQL Server Management Studio, and we have a C# developer that has no problem with establishing a connection, but for some reason, I can't. I am running Python 2.7, Debian 7, FreeTDS 0.91, and PYODBC 3.0.7. The SQL Server version is 2012, I think. Any ideas?
EDIT: On the remote connection, i have tried the following for the 'SERVER=' string:
69.178.xx.xx/ROA
69.178.xx.xx\ROA
mssql://69.178.xx.xx/ROA
mssql://69.178.xx.xx\ROA
69.178.xx.xx:1433/ROA
69.178.xx.xx:1433\ROA
mssql://69.178.xx.xx:1433/ROA
mssql://69.178.xx.xx:1433\ROA
and all of them return the same error.
EDIT 2: Fixed the port number on the things above.