mxODBC Zope DA

mxODBC Zope Database Adapter for Zope and Plone

Connect your Zope/Plone installation to all ODBC compliant databases and data sources in a hassle-free, robust and scalable way... with our new mxODBC Zope Database Adapter for Zope and Plone.
Version: 2.0.2

Introduction

The mxODBC Zope DA product allows you to easily connect your Zope installation or Plone CMS to just about any database backend on the market today, giving you the reliability of the commercially supported eGenix.com product mxODBC and the flexibility of the ODBC standard as middle-tier architecture.

mxODBC Zope DA works on Windows, Linux, Mac OS X, Solaris and FreeBSD, providing you with the same interface, flexibility and robustness across all on all these platforms.

The mxODBC Zope DA implements thread-safe connection pooling and multiple physical connects per logical Zope connection. You can safely run Z SQL Methods in parallel, achieving a much better performance than other Zope database adapters under heavy load. This makes it ideal for deployment in ZEO Clusters and Zope hosting environments where stability and high performance are a top priority.

Zope and Relational Database Systems (RDBMS)

At EuroPython 2007, we gave a talk about Zope and relational database systems (RDBMS). The talk provides a high-level introduction on how Zope can be used for database web applications and where the mxODBC Zope DA can help. Please see our Presentations & Talks section for details.

mxODBC Zope DA for Zope 2.x Database Applications

Our new version mxODBC Zope DA 2.0 was changed to conform to the new layout and installation system used by Zope 2.12 running Python 2.5 or 2.6. It is easily possible to integrate the mxODBC Zope DA installation into a zc.buildout setup or to install the product manually using easy_install.

Due to popular demand, we have also backported the new version to Python 2.4 for use with the older Zope 2.10 and Zope 2.11 releases. If you need database access for even older Zope releases, please consider using the previous release of our mxODBC Zope DA product, which supports Zope 2.3 - 2.11.

mxODBC Zope DA for Plone 3.x and Plone 4.0 Database Applications

Starting with mxODBC Zope DA 2.0.1, the Zope DA is now again compatible with Plone 3.2 and later. It fully integrates into the zc.buildout installation system used by these Plone versions. Plone 4.0 is supported as well. For older Plone versions,  please consider using the previous release of our mxODBC Zope DA product.

mxODBC Zope DA for Plone 4.1  and Zope 2.13 Database Applications

Even though we don't officially support using mxODBC Zope DA 2.0 with Plone 4.1 and Zope 2.13, we have successfully tested the setup when using the special installation instructions given below.

Features

  • Zope Level 3 Database Adapter: the mxODBC Zope DA is fully multi-threaded and can handle multiple connections to multiple databases.

  • Fully compatible to standard Z SQL Methods.

  • Connection Pooling: physical database connections are pooled and kept open, to reduce the connection overhead to a minimum. This is especially important for high latency database connections and ones like Oracle which take a considerable amount of time to setup

  • Parallel Execution of Queries on a single logical connection: the mxODBC Zope DA can manage any number of physical connections on a single logical connection. This enables running truly parallel Z SQL Method queries -- a feature not available in other Zope DAs.

  • Zero Maintenance Mode of Operation: connections which are having temporary network problems are automatically reconnected as they become available again.

  • Full Unicode Support: The Zope DA can communicate with the database using Unicode, 8-bit strings or a mix of the two. It provides automatic conversion as necessary to make it possible to adapt the database or the Zope application to the required needs.
  • Full 64-bit Support: The underlying mxODBC 3.1 library fully supports 64-bit platforms such as Mac OS X 10.6 (Snow Leopard) and 64-bit Linux systems that use iODBC or unixODBC.
  • Compatible with all recent Zope and Python releases: Supports Zope 2.10.9+, 2.11.4+, 2.12.x and is compatible with 2.13.x; supports Python 2.4, 2.5 and 2.6. If you need support for older Zope releases, please use version 1.0.10 of our mxODBC Zope DA.
  • Compatible with Plone 3.2 - 4.1: The zc.buildout compatible installation process allows easy integration with your existing Plone  3.2 - 4.1 installations.
  • Cross-platform Connection Objects: The Zope DA will automatically choose the right platform specific ODBC manager for you.

  • Per Connection Adjustable ODBC Interface: mxODBC comes with many different subpackages to choose from on Unix. The Zope DA allows you to select these subpackages on a per-connection basis.

  • Per Connection Error Handling: you can tell each connection whether it should report ODBC warnings or not; furthermore all warnings and errors are made available as list .messages on the DatabaseConnection object.

  • Transaction-safe Automatic Reconnect: when the DA finds that a connection has timed out, it automatically tries a reconnect and replays the transaction on the connection (unlike other DAs which break the transaction scheme by doing a reconnect without replay).

  • Built-in Schema Cache: this results in improved performance under heavy load.

  • Database Schema Access: all ODBC catalog methods are made available for much better database schema inquiry. The catalog methods allow building generic database interrogation or manipulation tools and facilitates writing database independent Zope products.

  • Native Support for Python data types: the Zope DA can optionally use Python datetime object, decimal objects in result sets to simplify integration. It also supports Zope's DateTime objects, mxDateTime objects, strings and tuples.
  • Lazy Connect: the mxODBC Zope DA only connects to the database backends when a connection is actually requested. This results in a better use of resources compared to other Zope DAs.

  • Fully compatible to the popular Znolk SQL Wizard Product and other similar products relying on the common database schema access methods .tables() and .columns().

System Requirements

The mxODBC Zope DA distribution includes all software needed to connect Zope to an ODBC manager. However, it does not include an ODBC manager or any ODBC drivers. You have to have these installed in order to be able to use mxODBC Zope DA.

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 Zope DA Administration and User Manual also includes a section on this topic and some helpful hints in case you run into problems.

Linux, FreeBSD, Solaris, AIX:

On Unix, you will have to install one of the popular ODBC managers iODBC or unixODBC 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 Zope DA Administration and User Manual for setup instructions.

Mac OS X:

On Mac OS X, you can use the system system ODBC manager (which actually is a version of the popular iODBC manager).

Please see the mxODBC Zope DA Administration and User Manual for setup instructions.

Licensing

The mxODBC Zope DA product is a commercial product and made available under the terms and conditions of the eGenix.com Commercial License Agreement, Version 1.2.0 (PDF file).

When purchasing a license for the mxODBC Zope DA product, you will receive a digitally signed Proof of Authorization authorizing you to install the product for use within one Zope Instance.

If you are using Zope clusters or multiple Zope instances on a single machine, you will have to buy one Zope Instance license per Zope instance that you have installed on the machine.

Evaluation

If you would like to evaluate the mxODBC Zope DA, 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. The evaluation licenses 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 Zope DA product can be bought via our secure eGenix.com Online Shop which is hosted by ShareIT.com (a service of Digital River). Licenses are sold per Zope Instance. For prices and volume discounts please check the mxODBC Zope DA Shop Page.

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

If you need to buy licenses for third parties (e.g. as contractor), please contact 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.

License Upgrades

If you'd like to upgrade licenses purchased for version 1.0 of the mxODBC Zope DA, we offer 40% discounts on the version 2.0 price for purchases of mxODBC Zope DA 1.0 licenses made since 2010-01-01 and 20% discounts for purchases made between 2009-06-01 and 2009-12-31. This offer is time limited until 2010-09-30.

Please contact the eGenix.com Sales Team for details.

Documentation

The following documentation is available for the mxODBC Zope DA:

mxODBC Zope DA Administration and User Manual - HTML and PDF

This manual includes instructions on how to install, configure and use the mxODBC Zope DA as well as a reference of the available programming interfaces.

mxODBC Reference Manual - HTML and PDF

The mxODBC Reference describes the included eGenix.com product mxODBC which is used by the mxODBC Zope DA to interface to the various database backends.

Please note that the mxODBC package included in the mxODBC Zope DA can only be used from within Zope and is usually a different version than the stand-alone mxODBC package.

The PDF files are also available as part of the installation. The mxODBC Zope DA Connection help screens provide links to the local copies after installation.

Download

Since Zope 2.12 has switched to egg archives for managing the Zope installation, we have followed that approach for our mxODBC Zope DA and provide egg archives for the various platforms and versions.

You normally do not need to download these egg archives manually, since the easy_install script or zc.buildout will  fetch the right archive for you. Please see the installation instructions for details.

However, if you are installing Zope on a firewall-protected server or intranet server without direct Internet-access, you can also download the egg archives manually and then point the easy_install or buildout to the already downloaded egg archives.

For some platforms, manual download may also be needed due to differences in platform name between our build systems and the target installation systems or due to missing supportin setuptools to parse the platform string part of the egg archives.

Please note that these binary distributions do not contain any license keys. You will either have to obtain evaluation licenses or buy production licenses in order to successfully install the package.

These files are made available to you under the terms and conditions of the eGenix.com Commercial License Agreement, Version 1.2.0 (PDF file).

Note: You are not allowed to redistribute these files.

Zope on Windows (x86 - 32-bit):

These egg archives include the mxODBC Zope DA Zope Product and all necessary eGenix.com mx Products (including mxODBC 3.1) prebuilt for Zope installations in one binary archive.

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

For instructions on how to install the egg archives, please see the installation section below.

Zope on Linux (i686 - 32-bit):

These egg archives include the mxODBC Zope DA Zope Product and all necessary eGenix.com mx Products (including mxODBC 3.1) prebuilt for Zope installations in one binary archive.

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 Zope DA with iODBC 3.52.7 and unixODBC 2.3.0. For unixODBC 2.3.1 and later please create a symlink from libodbc.so.2 to libodbc.so.1 as mentioned on the unixODBC news section.

For instructions on how to install the egg archives, please see the installation section below.

Zope on Linux (x86_64 - 64-bit):

These egg archives include the mxODBC Zope DA Zope Product and all necessary eGenix.com mx Products (including mxODBC 3.1) prebuilt for Zope installations in one binary archive.

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 Zope DA with iODBC 3.52.7 and unixODBC 2.3.0. For unixODBC 2.3.1 and later please create a symlink from libodbc.so.2 to libodbc.so.1 as mentioned on the unixODBC news section.

For instructions on how to install the egg archives, please see the installation section below.

Zope on Mac OS X (PPC + Intel - 32-bit):

These egg archives include the mxODBC Zope DA Zope Product and all necessary eGenix.com mx Products (including mxODBC 3.1) prebuilt for Zope installations in one binary archive.

Note that Mac OS X comes with a UCS2 build of Python, so please try the UCS2 product versions first.

Mac OS X ships with the iODBC ODBC manager as system default ODBC manager. Please configure your data sources using the system ODBC manager.

For instructions on how to install the egg archives, please see the installation section below.

Zope on Mac OS X (Intel - 64-bit):

These egg archives include the mxODBC Zope DA Zope Product and all necessary eGenix.com mx Products (including mxODBC 3.1) prebuilt for Zope installations in one binary archive.

Note that Mac OS X comes with a UCS2 build of Python, so please try the UCS2 product versions first.

Mac OS X ships with the iODBC ODBC manager as system default ODBC manager. Please configure your data sources using the system ODBC manager.

For instructions on how to install the egg archives, please see the installation section below.

Zope on FreeBSD (i386 - 32-bit):

These egg archives include the mxODBC Zope DA Zope Product and all necessary eGenix.com mx Products (including mxODBC 3.1) prebuilt for Zope installations in one binary archive.

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 Zope DA with iODBC 3.52.7 and unixODBC 2.3.0.

For instructions on how to install the egg archives, please see the installation section below.

Zope on FreeBSD (AMD64 - 64-bit):

These egg archives include the mxODBC Zope DA Zope Product and all necessary eGenix.com mx Products (including mxODBC 3.1) prebuilt for Zope installations in one binary archive.

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 Zope DA with iODBC 3.52.7 and unixODBC 2.3.0.

For instructions on how to install the egg archives, please see the installation section below.

Zope on Solaris:

Solaris binaries will be made available on demand.

Source Code:

mxODBC Zope DA is a commercial product for which we don't distribute the source code.

Other Platforms

If you have requirements for other platforms or Zope versions, please send us a note. The mxODBC Zope DA will compile on most Unix-like platforms where iODBC and/or unixODBC are available.

We can also prepare special versions which link directly against the database ODBC drivers. This may in some cases give you access to more advanced native database features.

Python Unicode Version (UCS2 vs. UCS4)

On Unix it is important to know whether you need to download a distribution for a narrow Unicode build of Python (UCS2) or a wide version (UCS4).

Most Unixes ship with wide Python builds these days (including RedHat and SuSE). In order to make sure, please run the following command which will tell you what kind of Python installation you have:

python -c "import sys;print(sys.maxunicode<66000)and'UCS2'or'UCS4'"

If you get errors such as "unresolved symbol PyUnicodeUCS2_AsEncodedString" when trying to load an extension from the distribution, you have likely installed an archive for a wrong Unicode version.

Installation

Please see the mxODBC Zope DA Administration and User Manual on how to install and setup the package. It is available as PDF for offline reading and HTML for online reading:

Some additional notes that cover post-release topics and are not mentioned in the above documentation:

Using mxODBC Zope DA with Plone 4.1 or Zope 2.13

Even though the mxODBC Zope DA 2.0 does not officially support Plone 4.1 or Zope 2.13, you can still install the product if you add two additional dependencies to your buildout.cfg file.

Here's an example of a single instance buildout.cfg file for Plone 4.1 using the default Python 2.6 UCS2 version that comes with Plone:

[buildout]
...
eggs =
    ...
    egenix-mxodbc-zopeda
    ThreadLock
    Products.ZSQLMethods

parts = ... egenix-mxodbc-zopeda-license find-links = ...
http://downloads.egenix.com/python/index/ucs2/ ### Install the Zope instance licenses for egenix-mxodbc-zopeda [egenix-mxodbc-zopeda-license] recipe = collective.recipe.template input = /path-to-license-dir/mxodbc_zopeda_license.py output = ${instance:location}/lib/python/mxodbc_zopeda_license.py [versions] ... egenix-mxodbc-zopeda = 2.0.x ThreadLock = 2.13.0 Products.ZSQLMethods = 2.13.4

The two products ThreadLock and ZSQLMethods were removed from the Zope 2.13 standard installation and now need to be explicitly added to the dependency list for the Zope DA to work.

Note: Be sure to pin down the versions as indicated in the above example.

Setting up mxODBC Zope DA for a Plone 4.1 ZEO installation

In a ZEO setup, each client will have to get a license, so you need multiple [egenix-mxodbc-zopeda-license] sections in you buildout.cfg, one for each client.

Here's an example buildout.cfg file for a ZEO cluster with two clients client1 and client2:

[buildout]
...
eggs =
    ...
    egenix-mxodbc-zopeda
    ThreadLock
    Products.ZSQLMethods

parts =
    ...
    egenix-mxodbc-zopeda-license-client1
    egenix-mxodbc-zopeda-license-client2

find-links =
    http://downloads.egenix.com/python/index/ucs2/

### Install the Zope instance licenses for egenix-mxodbc-zopeda

[egenix-mxodbc-zopeda-license-client1]
recipe = collective.recipe.template
input = /path-to-license-dir-for-client-1/mxodbc_zopeda_license.py
output = ${client1:location}/lib/python/mxodbc_zopeda_license.py

[egenix-mxodbc-zopeda-license-client2]
recipe = collective.recipe.template
input = /path-to-license-dir-for-client-2/mxodbc_zopeda_license.py
output = ${client2:location}/lib/python/mxodbc_zopeda_license.py

[versions]
...
egenix-mxodbc-zopeda = 2.0.x
ThreadLock = 2.13.0
Products.ZSQLMethods = 2.13.4

Reviews

If you prefer third-party reviews, have a look at these independent product reviews:

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.

References

The mxODBC Zope DA is already in production use on several high-volume Zope sites. Many others are currently evaluating the product, among these some very well-known companies in the industry. Please write to sales@egenix.com for more information.

History & Changes

Older versions of the mxODBC Zope DA which are still available: