473,320 Members | 2,112 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

import cx_Oracle

After cx_Oracle and the related Oracle tools for Python 2.2.3 +
Boa-constructor on Win2000, I added
"import cx_Oracle"
to the top of a test script.
It gives me an error about being unable to find the OCISetDefault entry
point in 'oci.dll'.
Google says nothing about this error, and neither does the cx_Oracle author.
Anyone have a solution for this problem?

--

-
GrayGeek
Jul 18 '05 #1
10 8934
> It gives me an error about being unable to find the OCISetDefault entry
point in 'oci.dll'.


cx_Oracle works on top of the regular oracle client, which you'll
need to install before it works. The OCI libraries are part of that.

Jul 18 '05 #2
Bernard Delmée wrote:
It gives me an error about being unable to find the OCISetDefault entry
point in 'oci.dll'.


cx_Oracle works on top of the regular oracle client, which you'll
need to install before it works. The OCI libraries are part of that.


I have it installed, and have used it to create webpages using Oracle's
HTP.P function, and I also accessed tables on the Oracle9 server from JDev9
and from PLSQLDeveloper. The oci.dll is in the Oracle Home/dll directory.
As my first post indicated, cx_Oracle is able to see oci.dll, it just can't
communicate with it properly.
???
--

-
GrayGeek
Jul 18 '05 #3
GrayGeek wrote:
Bernard Delmée wrote:

It gives me an error about being unable to find the OCISetDefault entry
point in 'oci.dll'.


cx_Oracle works on top of the regular oracle client, which you'll
need to install before it works. The OCI libraries are parOCISetDefault t of that.

I have it installed, and have used it to create webpages using Oracle's
HTP.P function, and I also accessed tables on the Oracle9 server from JDev9
and from PLSQLDeveloper. The oci.dll is in the Oracle Home/dll directory.
As my first post indicated, cx_Oracle is able to see oci.dll, it just can't
communicate with it properly.
???

i think that the binaries were built against another version of oracle.
i had a similar problem with DCOracle2 (versions 8.0.5 vs. 8.1.7 or
7.3.3 vs. 8.0.5).
As far as i remember OCISetDefault was one of the problematic symbols.

Jul 18 '05 #4
Uwe Hoffmann wrote:
GrayGeek wrote:
Bernard Delmée wrote:

It gives me an error about being unable to find the OCISetDefault entry
point in 'oci.dll'.

cx_Oracle works on top of the regular oracle client, which you'll
need to install before it works. The OCI libraries are parOCISetDefault t
of that.

I have it installed, and have used it to create webpages using Oracle's
HTP.P function, and I also accessed tables on the Oracle9 server from
JDev9
and from PLSQLDeveloper. The oci.dll is in the Oracle Home/dll
directory. As my first post indicated, cx_Oracle is able to see oci.dll,
it just can't communicate with it properly.
???

i think that the binaries were built against another version of oracle.
i had a similar problem with DCOracle2 (versions 8.0.5 vs. 8.1.7 or
7.3.3 vs. 8.0.5).
As far as i remember OCISetDefault was one of the problematic symbols.


I'm hoping that we can switch from Java to Python but since we are
standardizing on Oracle having a reliable Python connection to Oracle 9i is
important. mmm... Maybe I can use PostgreSQL for a proof of concept...
--

-
GrayGeek
Jul 18 '05 #5
GrayGeek wrote:
Uwe Hoffmann wrote:

GrayGeek wrote:
Bernard Delmée wrote:

>It gives me an error about being unable to find the OCISetDefault entry
>point in 'oci.dll'.

cx_Oracle works on top of the regular oracle client, which you'll
need to install before it works. The OCI libraries are parOCISetDefault t
of that.
I have it installed, and have used it to create webpages using Oracle's
HTP.P function, and I also accessed tables on the Oracle9 server from
JDev9
and from PLSQLDeveloper. The oci.dll is in the Oracle Home/dll
directory. As my first post indicated, cx_Oracle is able to see oci.dll,
it just can't communicate with it properly.
???


i think that the binaries were built against another version of oracle.
i had a similar problem with DCOracle2 (versions 8.0.5 vs. 8.1.7 or
7.3.3 vs. 8.0.5).
As far as i remember OCISetDefault was one of the problematic symbols.

I'm hoping that we can switch from Java to Python but since we are
standardizing on Oracle having a reliable Python connection to Oracle 9i is
important. mmm... Maybe I can use PostgreSQL for a proof of concept...


Is $ORACLE_HOME/bin on your path? This is how cx_Oracle picks up the
oci.dll. Its not necessary for the Oracle toolks like JDeveloper and
SQL*Plus, but its essential for third party tools.

You don't mention which version of Oracle you are using. There are
binaries for either Oracle 8i or 9i with Python 2.2 on the home page
(http://www.computronix.com/utilities.shtml#Oracle) but they won't work
with earlier versions of Oracle. Although, with a bit of luck and a
following wind the 8i binary can be used to access a 9i database (it
just can't do anything with the new features). But on the whole you will
be better off getting the appropriate driver for your database version.

Regards,
Andy
--
--------------------------------------------------------------------------------
From the desk of Andrew J Todd esq - http://www.halfcooked.com/

Jul 18 '05 #6
Waldemar Osuch wrote:
GrayGeek <jk********@FISHneb.rr.com> wrote in message
news:<Pq********************@twister.rdc-kc.rr.com>...
Andy Todd wrote:
> GrayGeek wrote:
>
>> Uwe Hoffmann wrote:
>>
>>
>>>GrayGeek wrote:
>>>
>>>>Bernard Delmée wrote:
>>>>
>>>>
>>>>
>>>>>>It gives me an error about being unable to find the OCISetDefault
>>>>>>entry point in 'oci.dll'.
>>>>>
>>>>>cx_Oracle works on top of the regular oracle client, which you'll
>>>>>need to install before it works. The OCI libraries are
>>>>>parOCISetDefault t of that.
>>>>
>>>>
>>>>I have it installed, and have used it to create webpages using
>>>>Oracle's HTP.P function, and I also accessed tables on the Oracle9
>>>>server from JDev9
>>>>and from PLSQLDeveloper. The oci.dll is in the Oracle Home/dll
>>>>directory. As my first post indicated, cx_Oracle is able to see
>>>>oci.dll, it just can't communicate with it properly.
>>>>???
>>>
>>> i think that the binaries were built against another version of
>>> oracle. i had a similar problem with DCOracle2 (versions 8.0.5 vs.
>>> 8.1.7 or
>>>7.3.3 vs. 8.0.5).
>>> As far as i remember OCISetDefault was one of the problematic
>>> symbols.
>>
>>
>> I'm hoping that we can switch from Java to Python but since we are
>> standardizing on Oracle having a reliable Python connection to Oracle
>> 9i is
>> important. mmm... Maybe I can use PostgreSQL for a proof of
>> concept...
>
> Is $ORACLE_HOME/bin on your path? This is how cx_Oracle picks up the
> oci.dll. Its not necessary for the Oracle toolks like JDeveloper and
> SQL*Plus, but its essential for third party tools.


Yes. cx_Oracle has no problem finding oci.dll, it just can find the
right 'entry point'.
>
> You don't mention which version of Oracle you are using. There are
> binaries for either Oracle 8i or 9i with Python 2.2 on the home page
> (http://www.computronix.com/utilities.shtml#Oracle) but they won't work
> with earlier versions of Oracle. Although, with a bit of luck and a
> following wind the 8i binary can be used to access a 9i database (it
> just can't do anything with the new features). But on the whole you
> will be better off getting the appropriate driver for your database
> version.


I started using Python 2.3 and when I ran into this problem my first tack
was to remove Python 2.3 and revert to Python 2.2, but Python 2.2 shows
the
same problem. We use both Oracle 8i and Oracle 9i. I am attempting to
connect to my Oracle 9i database. I have tried both binaries and the
"import cx_Oracle" dies in both using Python 2.2 against Oracle 9i.


I had similar problem once on a machine with two Oracle installations.
cx_Oracle was finding oci.dll all right but it was the wrong one.
When I found a machine with only one version of Oracle the problem
went away.
After this hurdle was over I had nothing but positive impressions from
using cx_Oracle module.

waldemar


mmm... the only Oracle onnection on my box is for the 9i database.

--

-
GrayGeek
Jul 18 '05 #7
GrayGeek wrote:
Waldemar Osuch wrote:

GrayGeek <jk********@FISHneb.rr.com> wrote in message
news:<Pq********************@twister.rdc-kc.rr.com>...
Andy Todd wrote:
GrayGeek wrote:
>Uwe Hoffmann wrote:
>
>
>
>>GrayGeek wrote:
>>
>>
>>>Bernard Delmée wrote:
>>>
>>>
>>>
>>>
>>>>>It gives me an error about being unable to find the OCISetDefault
>>>>>entry point in 'oci.dll'.
>>>>
>>>>cx_Oracle works on top of the regular oracle client, which you'll
>>>>need to install before it works. The OCI libraries are
>>>>parOCISetDefault t of that.
>>>
>>>
>>>I have it installed, and have used it to create webpages using
>>>Oracle's HTP.P function, and I also accessed tables on the Oracle9
>>>server from JDev9
>>>and from PLSQLDeveloper. The oci.dll is in the Oracle Home/dll
>>>directory. As my first post indicated, cx_Oracle is able to see
>>>oci.dll, it just can't communicate with it properly.
>>>???
>>
>> i think that the binaries were built against another version of
>> oracle. i had a similar problem with DCOracle2 (versions 8.0.5 vs.
>> 8.1.7 or
>>7.3.3 vs. 8.0.5).
>> As far as i remember OCISetDefault was one of the problematic
>> symbols.
>
>
>I'm hoping that we can switch from Java to Python but since we are
>standardizing on Oracle having a reliable Python connection to Oracle
>9i is
>important. mmm... Maybe I can use PostgreSQL for a proof of
>concept...

Is $ORACLE_HOME/bin on your path? This is how cx_Oracle picks up the
oci.dll. Its not necessary for the Oracle toolks like JDeveloper and
SQL*Plus, but its essential for third party tools.

Yes. cx_Oracle has no problem finding oci.dll, it just can find the
right 'entry point'.
You don't mention which version of Oracle you are using. There are
binaries for either Oracle 8i or 9i with Python 2.2 on the home page
(http://www.computronix.com/utilities.shtml#Oracle) but they won't work
with earlier versions of Oracle. Although, with a bit of luck and a
following wind the 8i binary can be used to access a 9i database (it
just can't do anything with the new features). But on the whole you
will be better off getting the appropriate driver for your database
version.

I started using Python 2.3 and when I ran into this problem my first tack
was to remove Python 2.3 and revert to Python 2.2, but Python 2.2 shows
the
same problem. We use both Oracle 8i and Oracle 9i. I am attempting to
connect to my Oracle 9i database. I have tried both binaries and the
"import cx_Oracle" dies in both using Python 2.2 against Oracle 9i.


I had similar problem once on a machine with two Oracle installations.
cx_Oracle was finding oci.dll all right but it was the wrong one.
When I found a machine with only one version of Oracle the problem
went away.
After this hurdle was over I had nothing but positive impressions from
using cx_Oracle module.

waldemar

mmm... the only Oracle onnection on my box is for the 9i database.


So, just to clarify, on your Windows box you now have *only* Python 2.2
and the Oracle 9i client? I'm presuming also that your database is on
another machine. And you've installed the appropriate cx_Oracle binary?
Works for me;

PythonWin 2.2.1 (#34, Apr 9 2002, 19:34:33) [MSC 32 bit (Intel)] on win32.
Portions Copyright 1994-2001 Mark Hammond (mh******@skippinet.com.au) -
see 'Help/About PythonWin' for further copyright information.
import cx_Oracle
cx_Oracle.version '3.1' db=cx_Oracle.connect('andy/andy@melchett')
cursor=db.cursor()
cursor.execute("SELECT user FROM dual") [<StringVar object at 0x012AAF08>] print cursor.fetchall() [('ANDY',)]


I also tried it with cx_Oracle version 2.5a, and then on my other
machine with Python 2.3, the 9i client and version 3.0a of cx_Oracle.

So, my guess is that you are still suffering from a DLL confusion
(somewhere).

Regards,
Andy
--
--------------------------------------------------------------------------------
From the desk of Andrew J Todd esq - http://www.halfcooked.com/

Jul 18 '05 #8
Andy Todd wrote:
GrayGeek wrote:
Waldemar Osuch wrote:

GrayGeek <jk********@FISHneb.rr.com> wrote in message
news:<Pq********************@twister.rdc-kc.rr.com>...

Andy Todd wrote:
>GrayGeek wrote:
>
>
>>Uwe Hoffmann wrote:
>>
>>
>>
>>>GrayGeek wrote:
>>>
>>>
>>>>Bernard Delmée wrote:
>>>>
>>>>
>>>>
>>>>
>>>>>>It gives me an error about being unable to find the OCISetDefault
>>>>>>entry point in 'oci.dll'.
>>>>>
>>>>>cx_Oracle works on top of the regular oracle client, which you'll
>>>>>need to install before it works. The OCI libraries are
>>>>>parOCISetDefault t of that.
>>>>
>>>>
>>>>I have it installed, and have used it to create webpages using
>>>>Oracle's HTP.P function, and I also accessed tables on the Oracle9
>>>>server from JDev9
>>>>and from PLSQLDeveloper. The oci.dll is in the Oracle Home/dll
>>>>directory. As my first post indicated, cx_Oracle is able to see
>>>>oci.dll, it just can't communicate with it properly.
>>>>???
>>>
>>> i think that the binaries were built against another version of
>>> oracle. i had a similar problem with DCOracle2 (versions 8.0.5 vs.
>>> 8.1.7 or
>>>7.3.3 vs. 8.0.5).
>>> As far as i remember OCISetDefault was one of the problematic
>>> symbols.
>>
>>
>>I'm hoping that we can switch from Java to Python but since we are
>>standardizing on Oracle having a reliable Python connection to Oracle
>>9i is
>>important. mmm... Maybe I can use PostgreSQL for a proof of
>>concept...
>
>Is $ORACLE_HOME/bin on your path? This is how cx_Oracle picks up the
>oci.dll. Its not necessary for the Oracle toolks like JDeveloper and
>SQL*Plus, but its essential for third party tools.

Yes. cx_Oracle has no problem finding oci.dll, it just can find the
right 'entry point'.
>You don't mention which version of Oracle you are using. There are
>binaries for either Oracle 8i or 9i with Python 2.2 on the home page
>(http://www.computronix.com/utilities.shtml#Oracle) but they won't work
>with earlier versions of Oracle. Although, with a bit of luck and a
>following wind the 8i binary can be used to access a 9i database (it
>just can't do anything with the new features). But on the whole you
>will be better off getting the appropriate driver for your database
>version.

I started using Python 2.3 and when I ran into this problem my first
tack was to remove Python 2.3 and revert to Python 2.2, but Python 2.2
shows the
same problem. We use both Oracle 8i and Oracle 9i. I am attempting to
connect to my Oracle 9i database. I have tried both binaries and the
"import cx_Oracle" dies in both using Python 2.2 against Oracle 9i.

I had similar problem once on a machine with two Oracle installations.
cx_Oracle was finding oci.dll all right but it was the wrong one.
When I found a machine with only one version of Oracle the problem
went away.
After this hurdle was over I had nothing but positive impressions from
using cx_Oracle module.

waldemar

mmm... the only Oracle onnection on my box is for the 9i database.


So, just to clarify, on your Windows box you now have *only* Python 2.2
and the Oracle 9i client? I'm presuming also that your database is on
another machine. And you've installed the appropriate cx_Oracle binary?
Works for me;


Your assumptions are correct. But, it doesn't work for me.

PythonWin 2.2.1 (#34, Apr 9 2002, 19:34:33) [MSC 32 bit (Intel)] on
win32. Portions Copyright 1994-2001 Mark Hammond
(mh******@skippinet.com.au) - see 'Help/About PythonWin' for further
copyright information.
>>> import cx_Oracle
>>> cx_Oracle.version '3.1' >>> db=cx_Oracle.connect('andy/andy@melchett')
>>> cursor=db.cursor()
>>> cursor.execute("SELECT user FROM dual") [<StringVar object at 0x012AAF08>] >>> print cursor.fetchall() [('ANDY',)] >>>


I also tried it with cx_Oracle version 2.5a, and then on my other
machine with Python 2.3, the 9i client and version 3.0a of cx_Oracle.

So, my guess is that you are still suffering from a DLL confusion
(somewhere).


Probably true, but JDev9 and PSQLDeveloper doesn't have any connection
problems.
??

--

-
GrayGeek
Jul 18 '05 #9
[snip]
mmm... the only Oracle onnection on my box is for the 9i database.


So, just to clarify, on your Windows box you now have *only* Python 2.2
and the Oracle 9i client? I'm presuming also that your database is on
another machine. And you've installed the appropriate cx_Oracle binary?
Works for me;

Your assumptions are correct. But, it doesn't work for me.

PythonWin 2.2.1 (#34, Apr 9 2002, 19:34:33) [MSC 32 bit (Intel)] on
win32. Portions Copyright 1994-2001 Mark Hammond
(mh******@skippinet.com.au) - see 'Help/About PythonWin' for further
copyright information.
>>> import cx_Oracle
>>> cx_Oracle.version

'3.1'
>>> db=cx_Oracle.connect('andy/andy@melchett')
>>> cursor=db.cursor()
>>> cursor.execute("SELECT user FROM dual")

[<StringVar object at 0x012AAF08>]
>>> print cursor.fetchall()

[('ANDY',)]
>>>


I also tried it with cx_Oracle version 2.5a, and then on my other
machine with Python 2.3, the 9i client and version 3.0a of cx_Oracle.

So, my guess is that you are still suffering from a DLL confusion
(somewhere).

Probably true, but JDev9 and PSQLDeveloper doesn't have any connection
problems.
??


Well, you've got me beaten. I tried to break my system by downloading
the Windows binary for Python 2.2 and Oracle8i, even though I have the
9i client - and it still worked.

The only combination I haven't tried, and I'm not going to, is the
cx_Oracle binary built against the Oracle9i client with the Oracle8i
client software which I suspect would break in the manner you describe.

As many people are successfully using cx_Oracle and you are the only one
seeing this problem I still suspect the solution to your problem is in
the combination of software you have running on your machine rather than
a bug in cx_Oracle, Python or Oracle.

Officially-throwing-in-the-towel-ly y'rs,
Andy
--
--------------------------------------------------------------------------------
From the desk of Andrew J Todd esq - http://www.halfcooked.com/

Jul 18 '05 #10
Andy Todd wrote:
[snip]
mmm... the only Oracle onnection on my box is for the 9i database.
So, just to clarify, on your Windows box you now have *only* Python 2.2
and the Oracle 9i client? I'm presuming also that your database is on
another machine. And you've installed the appropriate cx_Oracle binary?
Works for me;

Your assumptions are correct. But, it doesn't work for me.

PythonWin 2.2.1 (#34, Apr 9 2002, 19:34:33) [MSC 32 bit (Intel)] on
win32. Portions Copyright 1994-2001 Mark Hammond
(mh******@skippinet.com.au) - see 'Help/About PythonWin' for further
copyright information.
>>> import cx_Oracle
>>> cx_Oracle.version
'3.1'
>>> db=cx_Oracle.connect('andy/andy@melchett')
>>> cursor=db.cursor()
>>> cursor.execute("SELECT user FROM dual")
[<StringVar object at 0x012AAF08>]
>>> print cursor.fetchall()
[('ANDY',)]
>>>

I also tried it with cx_Oracle version 2.5a, and then on my other
machine with Python 2.3, the 9i client and version 3.0a of cx_Oracle.

So, my guess is that you are still suffering from a DLL confusion
(somewhere).

Probably true, but JDev9 and PSQLDeveloper doesn't have any connection
problems.
??


Well, you've got me beaten. I tried to break my system by downloading
the Windows binary for Python 2.2 and Oracle8i, even though I have the
9i client - and it still worked.

The only combination I haven't tried, and I'm not going to, is the
cx_Oracle binary built against the Oracle9i client with the Oracle8i
client software which I suspect would break in the manner you describe.

As many people are successfully using cx_Oracle and you are the only one
seeing this problem I still suspect the solution to your problem is in
the combination of software you have running on your machine rather than
a bug in cx_Oracle, Python or Oracle.

Officially-throwing-in-the-towel-ly y'rs,
Andy


Thanks for the effort, Andy. I think I will uninstall everything (except my
Oracle client) and reinstall.... again. Ya never know. That MS register
can do funny things....
--

-
GrayGeek
Jul 18 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Greg Lindstrom | last post by:
>Shouldn't this be '/u01/app/oracle/product/9.2.0' ? Based on the following values, that's what I'd expect. I changed the ORCALE_HOME environment variable to the above suggested value and got a...
1
by: Maxim Kuleshov | last post by:
Hello! Trying to fetch long varchar2 column and get the following error: cx_Oracle.DatabaseError: column at array pos 0 fetched with error: 1406 i.e. string buffer is not much enough to...
5
by: Daniel | last post by:
Hello from Brazil :-) I'm trying to bring cx_Oracle alive on my Python 2.4.1 @ HP-UX 11 (suckz) and Oracle 10.1.0 64bits without success I've already tryied the suggestions from Bernard Delmée...
4
by: Steve | last post by:
I'm trying to run a Python program on Unix and I'm encountering some behavior I don't understand. I'm a Unix newbie, and I'm wondering if someone can help. I have a simple program:...
1
by: ywhpaul | last post by:
ÏÂÝd°²Ñb cx_Oracle (Oracle 9i, Python 2.4) °æ±¾°²Ñbì¶windows xp ÔÚpythonÄ¿ä›Ï®aÉúC:\Python24\cx_Oracle-docÄ¿ä›®” >>> import cx_Oracle ³ö¬F Traceback (most recent call last): File...
7
by: Carl K | last post by:
I am trying to use this: http://python.net/crew/atuining/cx_Oracle/html/cx_Oracle.html it is a real module, right? sudo easy_install cx_Oracle did not easy_install cx_Oracle. ...
1
by: alf | last post by:
Hi, there is following issue: "import cx_Oracle" on windows pops up a nice 'DLL missing' window in case there indeed is no CLI.DLL (or something like that). Then the exception is raised. ...
3
by: Benjamin Hell | last post by:
Hi! I have a problem with the cx_Oracle module (Oracle database access): On a computer with cx_Oracle version 4.1 (Python 2.4.3, Oracle 10g) I can get query results consisting of strings...
0
by: M.-A. Lemburg | last post by:
On 2008-04-30 18:42, Sean Ryan wrote: The -v option only causes Python to print more information to stderr explaining where it is looking for modules. You should be seeing any dynamic loader...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.