Installation guide

4. Accessing Popular Databases
Access Violations
If you are experiencing problems related to access violations, like e.g.
ProgrammingError: ('37000', 0, '[Microsoft][ODBC SQL Server
Driver]Syntax error or access violation', 4498)
a possible reason could be that you are using a function or stored procedure
which is generating output using PRINT or that it uses RAISEERROR to report an
error with the parameters or values.
Another possible reason is that the ODBC driver for SQL Server does not support
the syntax you are using or that bound parameters are not allowed at that location
in the SQL statement. As work-around you can use Python string formatting to
insert the data verbatim directly into the SQL statement.
Distributed Transaction Managers
If you are using a transaction manager (e.g. MS DTC), you can sometimes get
warnings like the following:
mxODBC.Warning: ('01000', 7312, [Microsoft][ODBC SQL Server
Driver][SQL Server][OLE/DB provider returned message: New
transaction cannot enlist in the specified transaction
coordinator.]', 4606)
This is a problem related to the used transaction manager rather than mxODBC or
the database. Please consult your DBA for help.
Note that even though the above exception is raised by the cursor.execute()
method, the fact that it is a warning suggests that the executed operation was
indeed executed on the cursor.
Kerberos / Windows Integrated Authentication
In order to use Kerberos authentication the ODBC driver used by mxODBC has to
support this. mxODBC itself can help with the setup via connection options (see
Service Principal Names (SPNs) in Client Connections (ODBC)
), but does not need
to be setup in a special way to support Kerberos.
We know of these ODBC drivers that support Kerberos Windows integrated
authentication with MS SQL Server:
MS SQL Server Native Client for Windows
On Windows, you simply have to replace the "UID=…;PWD=…" part of your
connection string with "
Trusted_Connection=yes" in order to use Kerberos
authentication.
It may also be necessary to provide a Service Principal Name (SPN) for the server.
This can be done via the "
ServerSPN=…" keyword parameter in the connection
41