[Zope-DB] Oracle & Zope

M.-A. Lemburg mal at egenix.com
Mon Jun 28 12:27:20 EDT 2004

Chris Withers wrote:
> Hi All,
> There's been a fair bit of discussion about using Oracle from Zope both 
> on and off the lists recently, so I thought I'd some up the possibilities:
> 1. Continue to use ZOracleDA including DCOracle2. This option is no 
> longer supported by Zope Corp. Matt Kromer has expressed an interested 
> in maintaining ZOracleDA/DCOracle2 but I'm not sure of his availability 
> to do so. The code for DCOracle2 seems quite... interesting... but then 
> I don't read C-for-Python very well. There do seem to be issues 
> compiling it for certain Oracle/Zope/OS combinations, and it can use 
> huge numbers of Oracle connections if you have lots of Connection 
> objects in Zope. There is a branch in CVS to deal with this, but it 
> currently has some bugs of its own.
> 2. Use mxODBC and connect to Oracle via ODBC. mxODBC appears to be 
> stable and very well maintained, but I've never used it myself. Can it 
> be used to connect from *nix? What about *nix to Windows? What are the 
> drives that lead people to choose native adapters over ODBC and vice versa?

mxODBC interfaces Zope to an ODBC driver, so provided that you
have an ODBC driver that works on your Zope platform that connects
to you database (possibly over the net), you can connect Zope to
any backend you like.

mxODBC Zope DA currently works on Linux,
Solaris, FreeBSD and we offer ports to other platforms on a consulting
basis (we just recently ported it to AIX5 for a customer).

The code itself is highly portable. It probably compiles on more platforms
than you find ODBC drivers for ;-)

Regarding connections from e.g. *nix to Windows, there are several
possibilities for ODBC drivers. Depending on the database you can
choose from e.g. OpenLink, DataDirect, EasySoft, etc. etc. Most
of these provide high performance drivers, some even talk the native
database wire protocol directly (no more Oracle client lib hassles :-).

eGenix also has some new ideas on how to connect from one platform
to another which will go into development later this year. These
new products will make setups such as *nix to Windows especially
easy, since most databases come with Windows drivers anyway.

Now back to your question: connecting to Oracle from Windows
is really simple: all you have to do is install the Oracle ODBC
driver on Windows and use mxODBC Zope DA to connect to the driver
from Zope.

On *nix, you can get ODBC drivers from e.g. EasySoft
or try the open source Oracle driver that you can find at:
http://fndapl.fnal.gov/~dbox/oracle/odbc/ (this is actually
a branch of an early version of the EasySoft one).

We have used the EasySoft ODBC driver ourselves in customer
projects and it works just fine even with blobs and other
more exotic data types.

In any case, the positive side-effect of going down the route
of ODBC is that you can focus on getting the database schema
right instead of having to spend endless hours in getting
drivers to compile for each new revision of the database
and its client libraries.

> 3. Develop a new Zope Database Adapter for the cxOracle library, or use 
> an existing one if such a thing exists. Several people have said good 
> things about cxOracle. How well supported is it? Who uses it already?
> I'd be very interested to hear views on the above, particularly from 
> Matt, the eGenix guys and the cxOracle maintainers if anyone knows how 
> to contact them...

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Jun 28 2004)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
IL Workshop @ Net.ObjectDays 2004, Erfurt, Germany          90 days left

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::

More information about the Zope-DB mailing list