mxODBC Connect

mxODBC Connect - Python Database Interface

mxODBC Connect allows you to easily connect your Python application to remote database servers, using an mxODBC and Python DB-API 2.0 standard compatible interface.
Version: 2.0.0

Introduction

mxODBC Connect is a new client-server product from eGenix that enables fast, easy and secure access from any Python application to remote databases on your network, using the same well-established mxODBC Python DB-API 2.0 compatible API.

Unlike our mxODBC Python extension, mxODBC Connect is designed as client-server application, so you no longer need to find production quality ODBC drivers for all the platforms you target with your Python application.

Instead you use an easy to install Python client library which connects directly to the mxODBC Connect database server over the network.

This makes mxODBC Connect the ideal basis for writing cross-platform multi-tier database applications in Python, especially if you develop applications that need to communicate with databases such as MS SQL Server and MS Access, Oracle Database, IBM DB2 and Informix , Sybase ASE and Sybase Anywhere, MySQL, PostgreSQL, SAP MaxDB and many more, that run on remote Windows or Linux machines.

By removing the need to install and configure ODBC drivers on the client side, mxODBC Connect greatly simplifies setup, rollout and configuration of database driven client applications, while at the same time making the network communication between client and database server more efficient and more secure.

Overview

Building Python Database Applications on Standards

ODBC, or Open Database Connectivity, is the industry standard API for connecting applications to databases. In order to facilitate setting up ODBC connectivity, operating systems typically provide ODBC managers which help set up the ODBC drivers and manage the binding of the applications against these drivers. On Windows and Mac OS X the ODBC manager is built into the system. On Unix platforms, there are two ODBC managers, unixODBC and iODBC, which provide the same functionality on most Unix systems.

mxODBC, our stand-alone Python Database Interface, uses these ODBC managers to connect your Python application to the database. On Windows this is a straight-forward approach, since database vendors ship production quality Windows ODBC drivers for their databases.

On platforms such as Linux, Solaris, FreeBSD and Mac OS X, however, it is often not easy to get production quality ODBC drivers.

This is where mxODBC Connect makes a big difference...

How it Works

mxODBC Connect consists of two parts:

  • a server application which typically runs directly on the database server and
  • a client Python package which is installed on the client machine that runs the Python application.

The server part is a stand-alone application that uses our high-performance database adapter mxODBC to connect to the database server via ODBC.

The client package communicates with the server part over a TCP/IP network, optionally using:

  • SSL encryption,
  • certificate based authentication,
  • compression and
  • access control

Features that many other database drivers fail to deliver.

Add Flexibility, Performance and Security to your Python Applications

Instead of installing mxODBC and an ODBC driver on every client machine that runs your Python application, you only have to download and install the mxODBC Connect Client on your client machine.

The mxODBC Connect Client is an add-on to our eGenix.com mx Base Distribution which easily installs and runs on all major Python platforms, so you no longer have to worry about getting production quality ODBC drivers for all the client platforms you intend to support with your application.

On the server side, you install the mxODBC Connect Server. This stand-alone application comes with an easy to use installer for Windows and Linux and connects to the ODBC driver on the server machine in order to talk to the database kernel.

By having all server components on the same machine, you benefit from the added performance due to reduced low-level network communication, direct low-latency connection to the database kernel and the advantage of running queries on the more powerful database server machine.

The network protocol used by mxODBC Connect is optimized for the mxODBC Python Database API. As a result, you can achieve much better overall performance by using mxODBC Connect.

Typical Use Cases

mxODBC Connect solves the following typical use cases:

  • Configuration and Maintenance
    You have a lot of clients connecting to a single database and want to avoid the hassle of installing and maintaining an ODBC manager and driver installation on each of those clients.

    mxODBC Connect greatly simplifies the configuration by only requiring the connection information to be managed on the clients.
  • Reducing Costs of Client-Server Installations
    You have a client-server application that needs to connect to a single database and want to avoid the cost of having to buy mxODBC and ODBC driver licenses for each of those clients.

    mxODBC Connect is licensed per server and number of concurrent connections, not per client. This makes it a great alternative to reduce costs for many-to-one installations.
  • Reducing Costs of Stand-alone Installations
    You have difficulty finding a suitable production quality ODBC driver for the client platform you run your application on.

    Connecting from Unix to a Windows database server is a common example. mxODBC Connect provides a great alternative in that it allows you to use the robust Windows ODBC drivers directly on the database server.

Features

mxODBC Connect Client Features:

  • mxODBC 3.2 Client API: mxODBC Connect Client provides the same interface as our stand-alone mxODBC 3.2 interface on all supported client platforms, including all the useful DB-API extensions such as catalog methods, context manager support, multiple result sets, result set scrolling, flexible parameter styles, etc.
  • Easy Configuration: using an INI file or parameters.
  • Easy Installation: no need to worry about ODBC drivers for the client platform.
  • Easy Integration: porting existing mxODBC applications to mxODBC Connect is straight-forward and so is supporting both stand-alone mxODBC and mxODBC Connect in your client application for added flexibility.
  • Superior Performance: mxODBC Connect provides better performance compared to a stand-alone mxODBC + ODBC driver installation. We have measured more than 10 times better performance using SSL-encrypted mxODBC Connect with MS SQL Server running on Windows, compared to a non-encrypted mxODBC + FreeTDS ODBC driver setup on Linux connecting to the same database.
  • Enterprise Level Security: mxODBC Connect can use SSL encrypted connections - a feature that many database client interfaces don't provide.
  • Automatic Fail-over: the client will automatically choose the next available and working server if you configure multiple servers.
  • Enhanced Query Performance: by running queries directly on the server rather than client machines, you directly benefit from the more powerful server hardware.
  • Python Database API 2.0 Compliance: the mxODBC Connect Client API is fully Python DB-API 2.0 compatible and implements a large number of powerful extensions.
  • ODBC Catalog & Introspection Functions: mxODBC Connect Client API provides methods e.g. to list tables, find column specifications, query index relationships, etc.
  • Simplified handling of database warnings: mxODBC Connect Client now supports a new customizable .warningformat attribute to make warning handling easier.
  • Dynamic ODBC Configuration: adjust ODBC connection parameters dynamically, e.g. set timeouts, read-only access, auto-commit, etc.
  • Full Unicode Support: use Unicode for managing text data in your client applications - even if the database does not natively support Unicode, mxODBC Connect will automatically provide the necessary conversions on-the-fly.
  • Configurable Data Type Mappings:
    • Supports Python type binding and Database type binding.
    • Supports mxDateTime and Python's time and datetime modules for date/time value exchange.
    • Supports standard Python floats, integers, longs and Python's decimal module for loss-less numeric value exchange.
    • Automatically handles and supports unknown data types and user data types via string conversion.
  • Full Python Support: mxODBC Connect Client works with Python 2.5, 2.6 and 2.7 on 32-bit and 64-bit platforms - regardless of the server side platform.
  • Highly Portable Codebase : in addition to the already supported platforms for mxODBC Connect Client, we provide custom support for more exotic platforms.

mxODBC Connect Server Features:

  • Support for all recent ODBC Version : mxODBC Connect Server works with ODBC drivers implementing the ODBC version specifications 2.0 - 3.52.
  • Uses ODBC 3 APIs: provided the ODBC driver is capable of using ODBC 3 APIs, mxODBC will use them for added efficiency.
  • 32- and 64-bit ODBC: mxODBC supports both 32-bit and 64-bit versions of the ODBC standard.
  • Native 32- and 64-bit versions for Linux and Windows: Install the server part of mxODBC Connect on any modern OS.
  • Full ODBC Manager Support: mxODBC Connect Server can work with the 32-bit and 64-bit versions of the Windows ODBC Manager, as well as the 32-bit and 64-bit versions of unixODBC, iODBC and the DataDirect ODBC manager on Linux.
  • All recent ODBC drivers supported: to name a few...
    • Oracle Instant Client
    • IBM DB2
    • MS SQL Server Native Client
    • Sybase ASE
    • Netezza
    • Teradata
    • MySQL
    • PostgreSQL
  • Stable, robust and reliable:the mxODBC API has been in active use for more than 10 years.
  • Easy installation: an installer takes care of the complete setup of the server.
  • Easy configuration: a single INI file to configure the mxODBC Connect Server on all platforms.
  • Enterprise level security: commercial grade SSL encrypted communication, certificate based client authentication and server access control, username/password authentication. All in addition to the standard database access control and user management features you already deploy in your database servers.
  • Native OS Integration: mxODBC Connect Server can run as system service on Windows and system daemon on Unix.

System Requirements

mxODBC Connect Client:

The mxODBC Connect Clients requires installation of our Open-Source eGenix.com mx Base Distribution. If you also want to use SSL encrypted network communication, you can either use the standard Python ssl module or  install the eGenix.com pyOpenSSL Distribution to benefit from more advanced features. Both eGenix distributions come as easy to install pre-built binaries and are available on a wide variety of platforms.

The only other requirement is a working Python 2.5, 2.6 or 2.7 installation.

You do not need to have ODBC drivers for the platform on which you plan to run the mxODBC Connect Client package.

mxODBC Connect Server:

The eGenix mxODBC Connect Server includes everything you need to connect the server side ODBC manager to the mxODBC Connect Clients.

However, it does not include an ODBC manager or any ODBC drivers. You have to have these installed on the server machine in order to be able to use mxODBC Connect Server.

Windows

On Windows, the situation is very simple: most databases come with ODBC drivers and register them with the Windows ODBC manager that's part of every Windows system.

Please consult the ODBC driver documentation for details on how to setup ODBC data sources. The mxODBC User Manual also includes a section on this topic and some helpful hints in case you run into problems.

Linux

On Linux, you will have to install one of the popular ODBC managers iODBC, unixODBC or DataDirect and then register the ODBC drivers for your database with these ODBC managers.

Linux systems usually come with at least one of these ODBC managers preinstalled. Please see the mxODBC User Manual for ODBC data source setup instructions.

We currently support these Linux distributions for the mxODBC Connect Server: RedHat, Ubuntu, Debian and openSUSE. It will likely run on most other recent Linux distributions as well.

Other Operating Systems

Depending on customer feedback, mxODBC Connect Server will also be made available for other platforms.

If you have questions, please contact our sales team.

Licensing

The eGenix.com mxODBC Connect Server and Client products are made available under the terms and conditions of the eGenix.com Commercial License Agreement, Version 1.3.0 (PDF file).

mxODBC Connect Client:

The mxODBC Connect Client is a free download and can be installed on any number of machines, subject to the eGenix.com Commercial License Agreement, Version 1.3.0 together with the eGenix.com mxODBC Connect Client 2.0.0 General Proof of Authorization.

The only condition is that you have licensed the mxODBC Connect Server for evaluation or production use.

mxODBC Connect Server:

Licenses are required to run the mxODBC Connect Server. You purchase licenses based on the number of concurrent database connections you intend to open with the mxODBC Connect Server and the number of mxODBC Connect Server installations you require.

When purchasing a license for the mxODBC Connect Server product, you will receive a digitally signed Proof of Authorization (POA) license.txt file together with a license.py file that you need in order to provide to the mxODBC Connect Server installer.

Note: mxODBC Connect Server contains a number of open-source third-party products. For details please see the mxODBC Connect User Manual and Installation Guide.The license texts for these third-party products are available in the eGenix.com Third-Party License Guide 2.0.

Evaluation

If you would like to evaluate the eGenix.com mxODBC Connect product, please request an evaluation license or send an email to the eGenix.com Sales Team and include the following information: name of the licensee, number of evaluation licenses.

We will then send you the requested number of evaluation licenses by email. The evaluation licenses each permit installation on 1 CPU and allow up to 20 concurrent database connections. They have a built-in timeout of 30 days, but are otherwise fully functional.

If you are satisfied with the product, you can then proceed to the next section.

Buy Licenses

Production licenses for the mxODBC Connect product can be bought via our eGenix.com Online Shop. Licenses are sold per installation and number of concurrent database connections (the minimum is 20 concurrent connections).

For prices and volume discounts please check the mxODBC Connect Server License Shop Page.

We also offer site and corporate licenses. Please write to sales@egenix.com for quotes on these.

After purchase, you will receive the necessary license files from eGenix.com within two business by email to the shipping address you specified in the ordering process.

If you need to buy licenses for third parties (e.g. as contractor or reseller), please consult sales@egenix.com for instructions.

If you have questions about the ordering process, or the needed number of licenses, please write to the eGenix.com Sales Team.

Upgrades

If you are intending to upgrade from an existing mxODBC Connect Server license to the new mxODBC Connect Server 2.0, please contact the eGenix.com Sales Team with your existing license serials for details for an upgrade discount coupon.

We will give out 20% discount coupons for upgrade purchases going from mxODBC Connect Server 1.x to 2.0. After upgrade, use of the original license from which you upgraded is no longer permitted.

Developer Licenses

We plan to also offer developer licenses for mxODBC Connect which will then allow you to integrate mxODBC Connect into an application or product. Please contact the eGenix.com Sales Team for details.

Documentation

The following documentation is available for mxODBC Connect:

mxODBC Connect User Manual and Installation Guide - HTML and PDF

The manual includes an installation guide, a discussion of the design principles behind mxODBC Connect, as well as a reference of the available programming interfaces in the mxODBC Connect Client.

The mxODBC API itself is described in the following manual:

mxODBC User Manual and Reference Guide - HTML and PDF

The manual includes a reference of the available mxODBC programming interfaces.

Please note that the manual refers to the mxODBC package version included in the mxODBC Connect Server, which may be different from the mxODBC version availableas stand-alone package.

mxODBC Connect Server contains a number of open-source third-party products. The licenses for these are available in the eGenix.com Third-Party License Guide 2.0 .

The above PDF files are also available as part of the installation and can be found in the mx/ODBCConnect/Doc/ folder.

Books

"Python Programming On Win32" by Mark Hammond, Andy Robinson has a section on the mxODBC API.

Download and Installation

Since mxODBC Connect is designed as client-server application, you need to download components for the server and each of the clients.

The following sections explain the downloads required for the server and client. In this section, we give a brief overview of what you need to download and install.

Required Steps

  1. Get an evaluation license or purchase a production license for the server, if you haven't already done so.
  2. Download the mxODBC Connect Server installer for your server platform.
  3. Install the mxODBC Connect Server on your server machine. During the installation you will be asked to provide the license files from step 1.
  4. Download the eGenix.com mx Base Package installer for your client platform(s).
  5. Download the mxODBC Connect Client installer for your client platform(s).
  6. Install the eGenix.com mx Base Package and then the mxODBC Connect Client on your client machines. Please follow this order of installation, since the mxODBC Connect Client depends on the eGenix.com mx Base Package.
  7. Configure and tests the setup. Please see the mxODBC Connect documentation on how this is done.

If you need help with the installation process, please contact support@egenix.com.

Download of the mxODBC Connect Server

A successful installation of mxODBC Connect requires installation of at least one mxODBC Connect Server and a number of mxODBC Connect Clients.

Please note:

  1. The downloads below do not contain any license keys. You will either have to obtain evaluation licenses or buy production licenses in order to successfully install and use the mxODBC Connect Server.
  2. Please select the right download for your platform and then follow the installation instructions below.
  3. Since the eGenix.com mxODBC Connect Server uses cryptographic code (the eGenix.com pyOpenSSL Distribution) , you will be asked to confirm to comply to the German and EU export regulations (which are based on of the Wassenar Arangement). Please make sure that downloading and using cryptography is legal in your country.
IMPORTANT NOTICE:
By downloading, installing or using the eGenix mxODBC Connect Server, you agree to the terms and conditions set forth in the eGenix.com Commercial License Agreement 1.3.0 and the applicable licenses terms for the included third-party product (see eGenix.com Third-Party License Guide 2.0).

Redistribution of these files is not allowed. Please contact the eGenix Sales Team for details about redistribution possibilities and terms.

Windows (32-bit and 64-bit):

The mxODBC Connect Server installer will guide you through the installation process.

Please have the license files available on the server machine, since these are needed during the installation process.

The Windows ODBC manager which comes with the Windows Operating System will be used by this distribution.

Linux (32-bit and 64-bit):

The mxODBC Connect Server installer will guide you through the installation process.

Please have the license files available on the server machine, since these are needed during the installation process.

You will need to have one of popular ODBC managers for Unix installed on the target system: iODBC 3.52.x or unixODBC 2.3.x. We have successfully tested the product with iODBC 3.52.7 and unixODBC 2.3.1 (2.2.x will not work on x64 systems due to unixODBC API changes).

Source Code:

mxODBC Connect Server is a commercial product for which we do not make the source code available.

Other Platforms:

If you need mxODBC Connect Server for platforms not mentioned here, please contact support@egenix.com for details. It is very likely that we can find a way to help you.

Installation of mxODBC Connect Server

These are quick-install instructions. Please see the mxODBC Connect User Manual and Installation Guide for full details on installation and configuration of the mxODBC Connect Server.

The mxODBC Connect Server is shipped as installer application for Windows and as installation archive for Unix platforms.

Please Note:
The installer on both Windows and Unix will ask for a directory where you've unzipped the license files, so please make sure you have these readily available. The installer will then copy the files into the server installation directory.

Windows Installer

Installation using the Windows installers is straight forward: just double-click on the installer EXE file and follow the instructions.

Unix Installer

On Unix, you have to untar the installation archive, cd into the installation directory and then run the ./install command as root, e.g.

sudo ./install 

The installer will then ask a few questions and guide you through the installation process.

Download of the mxODBC Connect Client

mxODBC Connect Client is a Python extension package suitable for installation on a wide variety of client platforms. It is needed to communicate with the mxODBC Connect Server.

Please note:

  1. Please identify which Python version you have installed. We have setup the default selections below to what you normally need for the platform's default Python installations.
  2. Before continuing with the download of mxODBC Connect Client, please first make sure that you have installed the eGenix.com mx Base Distribution, since the eGenix.com mxODBC Connect Client is an add-on to our base set of Python extensions.
  3. If you want to use SSL encrypted connections to the mxODBC Connect Server, you can also install the eGenix.com pyOpenSSL Distribution for up-to-date OpenSSL libraries or use the ssl module that comes with Python.
  4. After successful download, please head on to the installation instructions below.
IMPORTANT:
By downloading, installing or using the eGenix mxODBC Connect Client, you agree to the terms and conditions set forth in the eGenix.com Commercial License Agreement 1.3.0 together with the eGenix.com mxODBC Connect Client 2.0.0 General Proof of Authorization.

Redistribution of these files is not allowed. Please contact the eGenix Sales Team for details about redistribution possibilities and terms.

Windows (x86 - 32-bit):

Please always download the correct installer for your Python version, otherwise you won't be able to install the package.

The package installers will guide you through the installation process.

Windows (x64 - 64-bit):

Please always download the correct installer for your Python version, otherwise you won't be able to install the package.

The package installers will guide you through the installation process.

All platforms (including Windows):

For instructions on how to install these prebuilt or egg distributions, please see the installation section below.

Source Code:

mxODBC Connect Client is a commercial product for which we do not make the source code available. However, the above prebuilt distribution archives do not depend on the client platform and should install on all Python platforms supported by the eGenix.com mx Base Distribution.

Installation of mxODBC Connect Client

These are quick-install instructions. Please see the mxODBC Connect User Manual and Installation Guide for full details on installation and configuration of the mxODBC Connect Client.

The mxODBC Connect Client package installation process works just like that of our other Python extension packages.

Windows Installer

Installation using the Windows installers is straight forward: just double-click on the installer EXE or MSI file and follow the instructions.

Both installers register the distribution with the Windows software registry, so you can easily uninstall the distribution should you require to do so.

With the new MSI installer you also have the option to run the installer without the GUI or to integrate it into an automatic installation process. Please see the MSI installer documentation on the Python web-site for details.

To uninstall the distribution, please use the standard Windows software registry.

Prebuilt Distribution Installation

To reduce the number of binaries that we have to create for each release, we have adapted a new generic distribution format that works on all Python platforms: the Prebuilt Distribution Format.

Technically, this format is a standard Python distutils distribution, but with only the build/ directory and without the source tree.

System-wide Installation

In order to install such a distribution, please follow these instructions:

  1. Download and unzip the archive into a temporary directory
  2. Change into the distribution directory
  3. Run the following command using the Python interpreter with which you intend to work (this could be the default one, or an application specific one depending on your needs):
    sudo python setup.py install
    On Windows and some other platforms that don't have sudo, please run the above without sudo as administrator or root.

The distribution will then be installed into the standard directory for Python extensions of your Python installation (usually the site-packages/ subdirectory of the Python standard library directory).

To uninstall, follow the same steps as above, but use the command uninstall instead:

sudo python setup.py uninstall

User Installation

You will need to be able to sudo on the target machine or know the root password for the above to work. If you don't have permission to install packages as root, you can still install the distribution into a local directory, e.g. ~/lib/python by using the following installation command:

python setup.py install --home=/home/user/

This will install the distribution into the directory /home/user/lib/python/. In order to have Python see this directory and make it useable for import, you have to adjust the PYTHONPATH environment variable to include this directory, e.g.

export PYTHONPATH /home/user/lib/python 

To see all the possible installation options, run the install script using the help options:

python setup.py install --help

To uninstall, follow the same steps as above, but use the command uninstall instead:

sudo python setup.py uninstall --home=/home/user/

Egg Archive Installation

The egg archives we provide are made available through two PyPI-style indexes which the egg tools setuptools/easy_install/pip/zc.buildout can access to automatically download and install the right egg archive.

There are two indexes, one for Python UCS2 builds:

http://downloads.egenix.com/python/index/ucs2/

and one for Python UCS4 builds:

http://downloads.egenix.com/python/index/ucs4/

Automatic Download and Installation

If you are using a Python UCS2 build, then you can install the egg archives using this command:

easy_install -i http://downloads.egenix.com/python/index/ucs2/ \ 
egenix-mxodbc-connect-client

For UCS4 builds, please use this command:

easy_install -i http://downloads.egenix.com/python/index/ucs4/ \ 
egenix-mxodbc-connect-client

The command line parameters for other tools such as pip are similar. Please consult their documentation for details.

Manual Download and Installation

In some cases, easy_install and other download tools cannot map the platform name to the name used in the egg archive. If you get errors during the installation, please manually download the right egg archive and then run the command directly on the downloaded egg archive:

easy_install \ 
    egenix_mxodbc_connect_client-2.0.0-py2.7.egg

Support

eGenix offers these support options:

Commercial Support

Professional level support for this product as well as all other eGenix products and Python itself is available directly from the developers at eGenix.com.

Consulting

eGenix.com offers professional consulting services for all questions and tasks around this product, including customized modifications, help with integration and on-site problem solving. Please contact sales@egenix.com for details.

Free User Support

In order for our users to keep in touch and be able to help themselves, we have created the egenix-users user mailing list.

History & Changes

Please see the change log for details regarding changes to the package between releases.

Older versions of mxODBC Connect, which are still available:

Notices

mxODBC Connect Server: This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). This product includes software written by Tim Hudson (tjh@cryptsoft.com). This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)