Re: [cx-oracle-users] Choosing client libraries
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2006-01-25 23:27:14
|
On 1/25/06, Paul Watson <pw...@re...> wrote: > How can I know, at runtime, with which version of Oracle libs my cx_Oracl= e is linked? > > >>> print cx_Oracle.version > HEAD > >>> print cx_oracle.apilevel > 2.0 > >>> print cx_oracle.buildtime > January 26, 2005 14:37:48 You can't. I can guess by looking at the constants that are defined in the header files but Oracle does not indicate what client version is in use -- so it would only be a guess. BTW, the HEAD designation was accidentally left in for cx_Oracle 4.1.1. If you get cx_Oracle 4.1.2 it will give you the correct version. > I am confused by your statement that cx_Oracle is linked to a specific Or= acle client. If I have Oracle 8.1 client in the PATH when I run my Python = script using cx_Oracle I can access an Oracle 8.1.7 running on an AIX box. = If I have the Oracle XE directory in the PATH, I can access the Oracle 10g= XE running on the local machine. The version of the Oracle database to which you are connecting is not the issue. Its the client version that matters. On Windows, the DLL name is called oci.dll for all versions of Oracle so the link will fail if and only if you use a cx_Oracle build for (for example) Oracle 10g and then try to actually run it with an Oracle 8i client. If you have a cx_Oracle build for Oracle 8i you should be able to run it successfully against Oracle 9i and Oracle 10g clients since Oracle is usually fairly careful about their API. On Unix platforms the client library is named libclntsh.so.<VERSION> and can be determined by using ldd. Since the version is included in the name of the shared library you cannot run cx_Oracle compiled against 8i with an Oracle 9i client. Does that clear things up? Or make things even more confusing? :-) > With respect to the suggestion that cx_Oracle have a set of redirection c= alls to connect with the Oracle libs, I do not think that the overhead of a= function call will be significant. Probably not -- especially if all of the function pointers are stored in global memory so the effort of looking them up is only performed once. I'm still uncertain as to whether the effort is worth it or not....I'm still thinking about it. Any further input would be appreciated. > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log fi= les > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D103432&bid=3D230486&dat= =3D121642 > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |