I'm having trouble connecting to a MS SQL Server database via Python using pyODBC:
import pyodbc
conn = pyodbc.connect(('DRIVER={SQL Server};'
'SERVER=tmw-prod-lo\\SQL65;'
'DATABASE=TMWSuite;'
'UID=VENTURE\\acoop;'
'PWD=RaNdoM!'))
This results in:
InterfaceError: ('28000', "[28000] [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'VENTURE\\acoop'. (18456) (SQLDriverConnect); [28000] [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'VENTURE\\acoop'. (18456)")
I'm pretty confident I've got all the parameters right and that I need to escape the backslashes in the server and username as above, correct? So it just looks like a permissions issue but I wanted to rule out any other issues first.