TrustedConnection broken for MSSQL-2008 native driver
In SQL Server 2008 when using native driver to connect to the server, {{{TrustedConnection=Yes}}} does not work anymore. Instead {{{Trusted_Connection=Yes}}} (note underscore) should be used, which works also with previous versions of SQL Server.
This is an issue only when using {{{SQL Server Native Client 10.0}}} driver, so the following does not work:
create_engine('mssql://my_server/my_db?driver=SQL Server Native Client 10.0')
resulting in an error:
Login failed for user ''. The user is not associated with a trusted SQL Server connection.
While these work just fine:
create_engine('mssql://my_server/my_db')
create_engine('mssql://my_server/my_db?driver=SQL Server') #// same as above actually
The workaround is to add the parameter manually:
create_engine('mssql://my_server/my_db?driver=SQL Server Native Client 10.0&Trusted_Connection=Yes')
but ideally it should be fixed as per attached patch files.
Comments (7)
-
repo owner -
Account Deleted I have tested it on both 2005/2008 and confirm it works.
And if it is any comforting, this is what pyodbc is using (ConnectionStrings), as well as this is how it is documented on connectionstrings.com: * http://connectionstrings.com/sql-server * http://connectionstrings.com/sql-server-2005 * http://connectionstrings.com/sql-server-2008 and most importantly on MSDN (official documentation has Trusted_Connection with an underscore): * SQL Server 2008 * SQL Server 2005
-
- assigned issue to
- changed milestone to 0.6.0
-
- changed status to resolved
-
repo owner committed in 0.5 in 359ca48d7b3328eef38bd3355b03fb0109d30f8b, 0.6 changelog in 9f2e94fc2c5f262c9339f1040b9bb208a45dc401
-
repo owner - changed milestone to 0.5.7
-
repo owner - removed milestone
Removing milestone: 0.5.7 (automated comment)
- Log in to comment
works with sqlserver 2005, 2000, etc. ? I'd hate to change it across the board and then have other folks report it as a bug on that end.