Python users on Ubuntu systems may have trouble connecting to Microsoft SQL Server on recent releases including 12.04 LTS. The popular pymssql python library for SQL Server connections contains a nasty bug in the distributed package that runs queries with no errors but returns empty result sets when one or more records are expected. You can view the defect details here: Bug #918896 [pymssql] returns no data from SQL server.
Read the comments for possible workarounds. It appears that the issue has still not been fixed and Debian has not resolved the upstream issue either. Good news is that you can uninstall the dpkg bundled package and then use “pip” to install a working copy of pymssql for your system copy of Python. Here are some hints to get it working, or just review the comments on the above linked bug report.
# Remove the broken pymssql package apt-get remove python-pymssql # Install dependencies apt-get install python-pip python-dev freetds-dev # Install working pymssql with "pip" pip install pymssql