views:

32

answers:

1

I am looking for a Python client for MSSQL, but one that supports encrypted connections to a remote MSSQL server.

Can someone recommend a technique for using Python to read from MSSQL, over an encrypted connection?

A: 

Encryption is usually a feature of the MSSQL client library and/or the OS, not Python. So first work out what encrpytion mechanism you want to use, then see how you can use it from Python.

MSSQL can be configured to support and even require encrypted connections from clients:

http://msdn.microsoft.com/en-us/library/ms191192.aspx

That means that any Python library that uses the native MSSQL client drivers would support encryption, which probably means something like adodbapi or pymssql on Windows.

You could also look into implementing something at the OS level to encrypt all network traffic, or even the network level (using a VPN). It might be easier, depending on your requirements, But it's probably a question for http://serverfault.com.

Pondlife
How do you know that the Python client supports encryption?Or is this an educated guess?
Joseph Turian
There really is no "Python MSSQL client" in the same way that there is no "C MSSQL client" or "Perl MSSQL client" or whatever. The various Python clients are bindings to Microsoft drivers: pymssql uses DBLIB (no longer supported by MS, by the way); pyodbc uses ODBC; adodpapi uses ADO etc. Because different drivers have different features, so do the Python wrappers. You have to experiment and see which one fits your environment and your existing codebase best.
Pondlife