[cx-oracle-users] Choosing client libraries
Brought to you by:
atuining
From: <pw...@re...> - 2006-01-21 16:39:27
|
> Date: Fri, 20 Jan 2006 15:57:51 -0700 > From: Anthony Tuininga <ant...@gm...> > To: cx-...@li... > Subject: Re: [cx-oracle-users] Choosing client libraries > Reply-To: cx-...@li... > > Unfortunately Oracle does not provide the client version in its files > anywhere so that information cannot be provided directly. You can > check for the existence of certain attributes (like > cx_Oracle.SessionPool is only available in 9i and up and > cx_Oracle.Connection.module is only available in 10g and up) or > something similar but I'm not aware of any other method of doing this. > Recognize as well that since cx_Oracle is linked directly against the > Oracle client libraries these must be present in order to even import > the module. Windows seems to like to also put information in a message > box (very unhelpful for server applications) when an import fails > because of a linking problem. > > The only effective means I have found of dealing with this is found in > my cx_OracleDBATools package. I search $ORACLE_HOME/lib for files that > are only found in 8i, 9i or 10g and then specifically import > cx_Oracle_8i or cx_Oracle_9i or cx_Oracle_10g as cx_Oracle. In other > words, you need to have each module available as a separate name and > then decide which version you want to import yourself. The oci.dll library has the version information in the Windows VERSIONINFO structure. At least, in the 8.1.7 client and the beta XE server packages it does. This can be accessed through the win32 module or directly using ctypes. Does this help? |