cx-oracle-users Mailing List for cx_Oracle (Page 20)
Brought to you by:
atuining
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(9) |
Sep
(8) |
Oct
(12) |
Nov
(4) |
Dec
(8) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(15) |
Feb
(12) |
Mar
(11) |
Apr
(5) |
May
(7) |
Jun
(8) |
Jul
(12) |
Aug
(2) |
Sep
(14) |
Oct
(17) |
Nov
(20) |
Dec
(3) |
| 2005 |
Jan
(16) |
Feb
(9) |
Mar
(22) |
Apr
(21) |
May
(73) |
Jun
(16) |
Jul
(15) |
Aug
(10) |
Sep
(32) |
Oct
(35) |
Nov
(22) |
Dec
(13) |
| 2006 |
Jan
(42) |
Feb
(36) |
Mar
(13) |
Apr
(18) |
May
(8) |
Jun
(17) |
Jul
(24) |
Aug
(30) |
Sep
(35) |
Oct
(33) |
Nov
(33) |
Dec
(11) |
| 2007 |
Jan
(35) |
Feb
(31) |
Mar
(35) |
Apr
(64) |
May
(38) |
Jun
(12) |
Jul
(18) |
Aug
(34) |
Sep
(75) |
Oct
(29) |
Nov
(51) |
Dec
(11) |
| 2008 |
Jan
(27) |
Feb
(46) |
Mar
(48) |
Apr
(36) |
May
(59) |
Jun
(42) |
Jul
(25) |
Aug
(34) |
Sep
(57) |
Oct
(97) |
Nov
(59) |
Dec
(57) |
| 2009 |
Jan
(48) |
Feb
(48) |
Mar
(45) |
Apr
(24) |
May
(46) |
Jun
(52) |
Jul
(52) |
Aug
(37) |
Sep
(27) |
Oct
(40) |
Nov
(37) |
Dec
(13) |
| 2010 |
Jan
(16) |
Feb
(9) |
Mar
(24) |
Apr
(6) |
May
(27) |
Jun
(28) |
Jul
(60) |
Aug
(16) |
Sep
(33) |
Oct
(20) |
Nov
(39) |
Dec
(30) |
| 2011 |
Jan
(23) |
Feb
(43) |
Mar
(16) |
Apr
(29) |
May
(23) |
Jun
(16) |
Jul
(10) |
Aug
(8) |
Sep
(18) |
Oct
(42) |
Nov
(26) |
Dec
(20) |
| 2012 |
Jan
(17) |
Feb
(27) |
Mar
|
Apr
(20) |
May
(18) |
Jun
(7) |
Jul
(24) |
Aug
(21) |
Sep
(23) |
Oct
(18) |
Nov
(12) |
Dec
(5) |
| 2013 |
Jan
(14) |
Feb
(10) |
Mar
(20) |
Apr
(65) |
May
(3) |
Jun
(8) |
Jul
(6) |
Aug
(3) |
Sep
|
Oct
(3) |
Nov
(28) |
Dec
(3) |
| 2014 |
Jan
(3) |
Feb
(9) |
Mar
(4) |
Apr
(7) |
May
(20) |
Jun
(2) |
Jul
(20) |
Aug
(7) |
Sep
(11) |
Oct
(8) |
Nov
(6) |
Dec
(12) |
| 2015 |
Jan
(16) |
Feb
(10) |
Mar
(14) |
Apr
(8) |
May
|
Jun
(8) |
Jul
(15) |
Aug
(7) |
Sep
(1) |
Oct
(33) |
Nov
(8) |
Dec
(5) |
| 2016 |
Jan
(18) |
Feb
(12) |
Mar
(6) |
Apr
(14) |
May
(5) |
Jun
(3) |
Jul
|
Aug
(21) |
Sep
|
Oct
(15) |
Nov
(8) |
Dec
|
| 2017 |
Jan
|
Feb
(14) |
Mar
(21) |
Apr
(9) |
May
(6) |
Jun
(11) |
Jul
(23) |
Aug
(6) |
Sep
(5) |
Oct
(7) |
Nov
(1) |
Dec
(1) |
| 2018 |
Jan
|
Feb
|
Mar
(16) |
Apr
(2) |
May
(1) |
Jun
|
Jul
(2) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
(2) |
Feb
(3) |
Mar
(1) |
Apr
(1) |
May
|
Jun
|
Jul
(2) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
| 2020 |
Jan
|
Feb
(4) |
Mar
|
Apr
|
May
(2) |
Jun
(1) |
Jul
(4) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(3) |
| 2021 |
Jan
|
Feb
(5) |
Mar
|
Apr
(7) |
May
(6) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2022 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2023 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Boris D. <bor...@gm...> - 2014-05-14 12:28:12
|
Thank you for the quick response. Do you already have any plans, when will
new version be released ?
2014-05-13 23:17 GMT+02:00 Anthony Tuininga <ant...@gm...>:
> Thanks for the simple program to demonstrate the problem. :-) I have just
> pushed a change to the source that resolves this issue. Apparently in
> Python 3 the first time the exception is referenced it is not normalized
> and so the error object I am creating is immediately accessible. The second
> level of exception results in a normalized exception which means that it
> can't be accessed in the same way. Fortunately the normalization can be
> forced so that I can access the error object the same way each time. A
> subtle and rare bug so I appreciate the pointer!
>
> Anthony
>
>
> On Tue, May 13, 2014 at 1:15 AM, Boris Dzuba <bor...@gm...>wrote:
>
>> Hi all,
>>
>> The following test program gives a segmentation fault:
>>
>> C:\>python
>> Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:19:30) [MSC v.1600 64
>> bit (AMD64)] on win32
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> import cx_Oracle
>> >>> c=cx_Oracle.connect(<connect string>).cursor()
>> >>> try:
>> ... c.execute("select")
>> ... except:
>> ... try:
>> ... c.execute("select")
>> ... except:
>> ... pass
>> ...
>>
>> C:\>
>>
>> Access Violation
>> Faulting application name: python.exe
>> Fault offset: 0x000000000000cacd
>>
>>
>> Platform: 64bit, Win7, Oracle Client 11g (11.2.0.1.0), python 3.3.3,
>> cx_Oracle 5.1.2
>>
>>
>>
>> At a guess, the problem is because in the function
>> Cursor_SetErrorOffset() /Cursor.c/:
>>
>> static void Cursor_SetErrorOffset(
>> udt_Cursor *self) // cursor to get the error offset
>> from
>> {
>> PyObject *type, *value, *traceback;
>> udt_Error *error;
>>
>> PyErr_Fetch(&type, &value, &traceback);
>> if (type == g_DatabaseErrorException) {
>> error = (udt_Error*) value;
>> OCIAttrGet(self->handle, OCI_HTYPE_STMT, &error->offset, 0,
>> OCI_ATTR_PARSE_ERROR_OFFSET,
>> self->environment->errorHandle);
>> }
>> PyErr_Restore(type, value, traceback);
>> }
>>
>> OCIAttrGet() call attempts to write a value to the address
>> /&error->offset/,
>> therefore after the end of an allocated memory block of the borrowed
>> pointer /PyObject *value/
>>
>> typedef struct {
>> PyObject_HEAD
>> sb4 code;
>> ub4 offset;
>> PyObject *message;
>> const char *context;
>> } udt_Error;
>>
>>
>> Commenting it out /* OCIAttrGet(self->handle, OCI_HTYPE_STMT,
>> &error->offset, 0, OCI_ATTR_PARSE_ERROR_OFFSET,
>> self->environment->errorHandle);*/
>> fix this crash!
>>
>>
>> Regards,
>> Boris
>>
>>
>> ------------------------------------------------------------------------------
>> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
>> Instantly run your Selenium tests across 300+ browser/OS combos.
>> Get unparalleled scalability from the best Selenium testing platform
>> available
>> Simple to use. Nothing to install. Get started now for free."
>> http://p.sf.net/sfu/SauceLabs
>> _______________________________________________
>> cx-oracle-users mailing list
>> cx-...@li...
>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users
>>
>>
>
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform
> available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> cx-oracle-users mailing list
> cx-...@li...
> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users
>
>
|
|
From: Anthony T. <ant...@gm...> - 2014-05-13 21:17:20
|
Thanks for the simple program to demonstrate the problem. :-) I have just
pushed a change to the source that resolves this issue. Apparently in
Python 3 the first time the exception is referenced it is not normalized
and so the error object I am creating is immediately accessible. The second
level of exception results in a normalized exception which means that it
can't be accessed in the same way. Fortunately the normalization can be
forced so that I can access the error object the same way each time. A
subtle and rare bug so I appreciate the pointer!
Anthony
On Tue, May 13, 2014 at 1:15 AM, Boris Dzuba <bor...@gm...> wrote:
> Hi all,
>
> The following test program gives a segmentation fault:
>
> C:\>python
> Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:19:30) [MSC v.1600 64
> bit (AMD64)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import cx_Oracle
> >>> c=cx_Oracle.connect(<connect string>).cursor()
> >>> try:
> ... c.execute("select")
> ... except:
> ... try:
> ... c.execute("select")
> ... except:
> ... pass
> ...
>
> C:\>
>
> Access Violation
> Faulting application name: python.exe
> Fault offset: 0x000000000000cacd
>
>
> Platform: 64bit, Win7, Oracle Client 11g (11.2.0.1.0), python 3.3.3,
> cx_Oracle 5.1.2
>
>
>
> At a guess, the problem is because in the function Cursor_SetErrorOffset()
> /Cursor.c/:
>
> static void Cursor_SetErrorOffset(
> udt_Cursor *self) // cursor to get the error offset
> from
> {
> PyObject *type, *value, *traceback;
> udt_Error *error;
>
> PyErr_Fetch(&type, &value, &traceback);
> if (type == g_DatabaseErrorException) {
> error = (udt_Error*) value;
> OCIAttrGet(self->handle, OCI_HTYPE_STMT, &error->offset, 0,
> OCI_ATTR_PARSE_ERROR_OFFSET,
> self->environment->errorHandle);
> }
> PyErr_Restore(type, value, traceback);
> }
>
> OCIAttrGet() call attempts to write a value to the address
> /&error->offset/,
> therefore after the end of an allocated memory block of the borrowed
> pointer /PyObject *value/
>
> typedef struct {
> PyObject_HEAD
> sb4 code;
> ub4 offset;
> PyObject *message;
> const char *context;
> } udt_Error;
>
>
> Commenting it out /* OCIAttrGet(self->handle, OCI_HTYPE_STMT,
> &error->offset, 0, OCI_ATTR_PARSE_ERROR_OFFSET,
> self->environment->errorHandle);*/
> fix this crash!
>
>
> Regards,
> Boris
>
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform
> available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> cx-oracle-users mailing list
> cx-...@li...
> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users
>
>
|
|
From: Boris D. <bor...@gm...> - 2014-05-13 07:15:28
|
Hi all,
The following test program gives a segmentation fault:
C:\>python
Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:19:30) [MSC v.1600 64
bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle
>>> c=cx_Oracle.connect(<connect string>).cursor()
>>> try:
... c.execute("select")
... except:
... try:
... c.execute("select")
... except:
... pass
...
C:\>
Access Violation
Faulting application name: python.exe
Fault offset: 0x000000000000cacd
Platform: 64bit, Win7, Oracle Client 11g (11.2.0.1.0), python 3.3.3,
cx_Oracle 5.1.2
At a guess, the problem is because in the function Cursor_SetErrorOffset()
/Cursor.c/:
static void Cursor_SetErrorOffset(
udt_Cursor *self) // cursor to get the error offset
from
{
PyObject *type, *value, *traceback;
udt_Error *error;
PyErr_Fetch(&type, &value, &traceback);
if (type == g_DatabaseErrorException) {
error = (udt_Error*) value;
OCIAttrGet(self->handle, OCI_HTYPE_STMT, &error->offset, 0,
OCI_ATTR_PARSE_ERROR_OFFSET,
self->environment->errorHandle);
}
PyErr_Restore(type, value, traceback);
}
OCIAttrGet() call attempts to write a value to the address
/&error->offset/,
therefore after the end of an allocated memory block of the borrowed
pointer /PyObject *value/
typedef struct {
PyObject_HEAD
sb4 code;
ub4 offset;
PyObject *message;
const char *context;
} udt_Error;
Commenting it out /* OCIAttrGet(self->handle, OCI_HTYPE_STMT,
&error->offset, 0, OCI_ATTR_PARSE_ERROR_OFFSET,
self->environment->errorHandle);*/
fix this crash!
Regards,
Boris
|
|
From: Marcus D. <md...@gm...> - 2014-05-02 17:44:50
|
Hello there
I'm trying to CREATE TABLE AS using cx_Oracle on Python 2.4.6
The following code:
query = '''CREATE TABLE TMP_STATS_1 AS
select NUM from INF_CARD where IMPORT_DATE between
to_date(:datepass || ' 00:00:00','dd/mm/yyyy hh24:mi:ss') and
to_date(:datepass || ' 23:59:59','dd/mm/yyyy hh24:mi:ss')'''
curs.execute(query, datepass=datep)
Returns: cx_Oracle.DatabaseError: ORA-01036: illegal variable name/number
Taking out the CREATE TABLE TMP_STATS_1 AS and leaving only the SELECT
statement, works perfectly. Also, when using CREATE TABLE AS statement on
SQLPLUS it runs correctly.
Is there any specific syntax for CREATE TABLE AS to be used in cx_Oracle?
Tried to find examples for this, but none found so far.
Regards,
Marcus
|
|
From: 君童 <370...@qq...> - 2014-04-21 03:04:51
|
Hello everyone. I had a problem when I compile cx_Oracle5.1.2 using "python setup.py build". There are some build errors as follows: Callback.c:49: error: ‘udt_Variable’ has no member named ‘data’ Callback.c:50: error: ‘udt_Variable’ has no member named ‘actualLength’ Callback.c:51: error: ‘udt_Variable’ has no member named ‘returnCode’ Callback.c:52: error: ‘udt_Variable’ has no member named ‘size’ Callback.c:52: error: ‘udt_VariableType’ has no member named ‘size’ Callback.c:53: error: ‘udt_Variable’ has no member named ‘bufferSize’ Callback.c:53: error: ‘udt_VariableType’ has no member named ‘size’ Callback.c:54: error: ‘udt_VariableType’ has no member named ‘isVariableLength’ Callback.c:55: error: ‘udt_Variable’ has no member named ‘bufferSize’ Callback.c: At top level: Callback.c:65: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token Callback.c:113: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token Callback.c:154: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token Callback.c:176: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token What should I do? Thanks. |
|
From: Miten M. <ind...@gm...> - 2014-04-11 12:44:59
|
Hi,
I am unable to get python setup.py build to function correctly under cygwin.
$ python setup.py build
running build
running build_ext
building 'cx_Oracle' extension
creating build/temp.cygwin-1.7.27-i686-2.7-11g
gcc -fno-strict-aliasing -ggdb -O2 -pipe
-fdebug-prefix-map=/home/jt/rel/python-2.7.3-1/python-2.7.3-1/build=/usr/src/debug/python-2.7.3-1
-fdebug-prefix-map=/home/jt/rel/python-2.7.3-1/python-2.7.3-1/src/Python-2.7.3=/usr/src/debug/python-2.7.3-1
-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/include
-I/cygdrive/d/software/oracle/instantclient_11_2/rdbms/demo
-I/cygdrive/d/software/oracle/instantclient_11_2/rdbms/public
-I/cygdrive/d/software/oracle/instantclient_11_2/network/public
-I/cygdrive/d/software/oracle/instantclient_11_2/oci/include
-I/usr/include/python2.7 -c cx_Oracle.c -o
build/temp.cygwin-1.7.27-i686-2.7-11g/cx_Oracle.o -DBUILD_VERSION=5.1
-mno-cygwin
gcc: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
I am using /cygdrive/d/software/pythonlibs/cx_Oracle-5.1
$ echo $ORACLE_HOME
/cygdrive/d/software/oracle/instantclient_11_2
$ echo $LD_LIBRARY_PATH
/cygdrive/d/software/oracle/instantclient_11_2
My python is:
Python 2.7.3 (default, Dec 18 2012, 13:50:09)
[GCC 4.5.3] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
dlopen("/usr/lib/python2.7/lib-dynload/readline.dll", 2);
import readline # dynamically loaded from
/usr/lib/python2.7/lib-dynload/readline.dll
Regards,
Miten.
I am not sure how to fix the error. why do I see those /usr/src/debug and
/home/jt/rel which are non-existent in my file system.
|
|
From: <joa...@ot...> - 2014-04-08 17:27:19
|
Hi, I'm having problems in getting cx_oracle working with Unicode using python 3 The setup: Python 3.3.2 Oracle Server: 11g Client library: 11_2_03 NLS_LANG: American_America.UTF8 NLS_CHARACTERSET: WE8MSWIN1252 NLS_NCHAR_CHARACTERSET: AL16UTF16 The db table contains both varchar2 and nvarchar2 columns. I can use SqlPlus to read and write Unicode strings in the nvarchar2 columns without any problems, however in cx_oracle, the same statements will result in a conversion loss and the "to big" chars will be replaced with ¿ both in the read and inserted data. Since things works with sqlplus I would assume that the server/client lib side is fine but there is something I missed in how I use cx_oracle. Goggling on the issue, I found this in the oracle unicode guidelines: http://docs.oracle.com/cd/B28359_01/server.111/b28298/ch7progrunicode.htm#i1006452. "When you bind or define SQL NCHAR datatypes and do not set OCI_ATTR_CHARSET_FORM, data conversions take place from client character set to the database character set, and from the database character set to the national database character set. In the worst case, data loss can occur if the database character set is smaller than the client's." This seems to describe the problem that I see spot on, i.e that the string passes through the database charset (WE8MSWIN1252) when doing the conversion between client UTF8 and server UTF16. In the python 2.x code path it looks like OCI_ATTR_CHARSET_FORM is explicitly set depending on the database column type but I can't find any similar code for the python3 code path. Doing a quick hack and actually set this attribute for strings seem to indicate that this is a problem and the values shows up nicely when making queries. So is this setup not supported, anything I missed and are there any way to get around this when the database charset is not Unicode? Thanks Joakim |
|
From: Shai B. <sh...@pl...> - 2014-04-07 20:08:38
|
Hi, I've been trying to track down the segmentation fault with Python 3, and I'm getting a little over my head. I got a stack trace with Python info (attached), and from it, it seems like there's a reference-counting counting problem with exceptions. I took a look, and it seemed like the Py_DECREF call at Environment.c:375 (Environment_RaiseError) could be responsible -- there is no parallel for it in Environment_CheckForError -- but commenting it out did not seem to fix anything. Any pointers would be greatly appreciated, Shai. |
|
From: Shai B. <sh...@pl...> - 2014-04-07 07:43:47
|
On Wednesday 02 April 2014 16:12:50 Shai Berger wrote: > Hi, > > On Monday 31 March 2014 23:09:24 Anthony Tuininga wrote: > > I am hoping to have a new release made sometime next week at the latest. > > At first I was quite alarmed at this, since the Django test-suite gets > segfaults out of cx_Oracle 5.1.2 with Python 3 and none of the commits > since then seemed to address that; but I am happy to report that, using > the current tip, I was able to run the full Django test-suite on both > Python 3.3 and 3.4 (it doesn't pass yet, but we can probably solve the > problems in Python code). > I am also sorry to report that the above happy report was premature -- the test suite completes with Python3 on the master branch and the upcoming 1.7 branches of Django, but the 1.6.X branch still segfaults. I'd like to fix this before the next release as well. Shai. |
|
From: Shai B. <sh...@pl...> - 2014-04-07 02:25:21
|
Hi, TL;DR: Patch improving int performance submitted; requesting permission and time to work in further improvement with decimals. On Wednesday 02 April 2014 16:12:50 Shai Berger wrote: > > On Monday 31 March 2014 23:09:24 Anthony Tuininga wrote: > > I am hoping to have a new release made sometime next week at the latest. > > I am still working on a smail performance-improvement patch. This patch is now pull request #6. It fixes a funny situation: without the patch, cx_Oracle will only process ints as C ints if the column is defined so that all values fit in an int -- and a 32-bit int. This means NUMBER(n) with n<10. However, the common definition of columns is intended to be able to hold all ints -- and is, therefore, NUMBER(11). When cx_Oracle sees that, it turns the numbers into Python strings and tells Python to parse them into Python ints. The suggested fix uses a fast way to check the number of digits in actually returned values, and also takes the size of the C "long" type into effect -- and so, on today's common 64-bit servers, all NUMBER(11) values can be handled without going through strings. However, this is still not satisfactory for me. My main motivation, as I've mentioned before, is improving the Django/Oracle combination; and it is very hard for Django to enjoy this improvement, because, in its role as framework, it needs to support Decimals. In practice, this means using numbersAsStrings, which nullifies the effect of the fix. Currently, cx_Oracle supports Decimals as input, but not as output -- if numbersAsStrings is off, it returns Python floats, which are much less precise. However, Decimals and floats are not interchangeable -- if cx_Oracle suddenly starts to return Decimals where it currently returns floats, user code will break. But I still want a way to handle Decimals, without the performance implications of numbersAsStrings. The ideas I currently have are to add flags to control the reutned type of decimal fields: decimalsAsDecimals would be nice, but even decimalsAsStrings (preserve current behavior, but only where there is nothing better to do) will be a great help. (On second though, decimalsAsDecimals sounds a little funny; it should probably be named decimalsAsFloats, and default to True for the time being). I am willing to work on the required patches, but I would like to have enough time to include them in the upcoming version. Thanks, Shai. |
|
From: Shai B. <sh...@pl...> - 2014-04-02 13:36:54
|
Hi, On Monday 31 March 2014 23:09:24 Anthony Tuininga wrote: > > I am hoping to have a new release made sometime next week at the latest. At first I was quite alarmed at this, since the Django test-suite gets segfaults out of cx_Oracle 5.1.2 with Python 3 and none of the commits since then seemed to address that; but I am happy to report that, using the current tip, I was able to run the full Django test-suite on both Python 3.3 and 3.4 (it doesn't pass yet, but we can probably solve the problems in Python code). I am still working on a smail performance-improvement patch. I pushed my proposed change to https://bitbucket.org/shaib/cx_oracle; I haven't had a chance to benckmark it properly yet. As a first indication, in a very non- rigorously controlled test-environment, it seems to improve the timings of the full Django test-suite by ~10% (using this needs adaptations on the Django side, which I am also still working on). Thanks for all the good work, Shai. |
|
From: Anthony T. <ant...@gm...> - 2014-03-31 20:09:36
|
Hi, I am hoping to have a new release made sometime next week at the latest. This would include support for Python 3.4 as well as Oracle 12c. It works if you build it yourself with the current source, but as you note, building on Windows is not a simple thing to set up. :-) Anthony On Sun, Mar 30, 2014 at 4:50 PM, Ralf M. <Ra...@t-...> wrote: > Hello, > > I was looking for a Windows installer of cx_Oracle for Python 3.4 > (specifically cx_Oracle-5.1.2-11g.win-amd64-py3.4.msi). PyPI points to a > web-page for cx_Oracle (http://cx-oracle.sourceforge.net/), but there > are no packages for Python 3.4. > > Background: > I would like to upgrade to Python 3.4, but I need cx_Oracle. I have > never built any extension module (I have neither the tools nor the > knowledge). So, as long as there is no installer available, I won't be > able to upgrade to 3.4. > > Any information would be appreciated. > > Best regards > Ralf M. > > > > > > > ------------------------------------------------------------------------------ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
|
From: Ralf M. <Ra...@t-...> - 2014-03-30 22:50:36
|
Hello, I was looking for a Windows installer of cx_Oracle for Python 3.4 (specifically cx_Oracle-5.1.2-11g.win-amd64-py3.4.msi). PyPI points to a web-page for cx_Oracle (http://cx-oracle.sourceforge.net/), but there are no packages for Python 3.4. Background: I would like to upgrade to Python 3.4, but I need cx_Oracle. I have never built any extension module (I have neither the tools nor the knowledge). So, as long as there is no installer available, I won't be able to upgrade to 3.4. Any information would be appreciated. Best regards Ralf M. |
|
From: 赵宋 <43...@qq...> - 2014-03-23 11:46:47
|
Hi Folks, hi Anthony, I'm using cx_Oracle 5.1.2 in CentOS 6.4. My app is a web app based in web.py web framework.So I call cx_Oracle through web.py. The web.py will call cx_Oracle. I have tried insert about 5,000 rows into a oracle table. The web app process will consume about 1.6G memory when inserting. After insert finished, the web app process still occupy 1.6G memory. So I will try insert about 3-4 times, the web app process will be killed by linux OS. But when I run this web app in windows, the proecss will also occupy 1.6G memory,but when the insert finished, the process will release the 1.6G memory. So what the difference between the windows or linux OIP and cx_Oracle? Thank you all in advance for giving feedback. It's a really severe problem for me here. Best Regards, Stone Zhao. |
|
From: Massa, H. A. <ch...@gh...> - 2014-03-02 15:55:48
|
Harvey, for 64bit Python you need a 64bit cx_Oracle. Sadly, I do not know of an 64 cx_Oracle Windows installer. So your ways forward are: a) use Python 32bit or b) compile cx_Oracle for 64 bit on windows. a) is way easier. Best wishes, Harald 2014-02-28 15:42 GMT+01:00 Harvey, Charles N <cha...@jp...> : > Help! > I have no control over my installations because this is a corporate > machine (bank). I have a 64bit win7 machine with 64bit Python 2.7. Great! > But I checked my Oracle install and it is 32bit. Is there any hope for me > getting cx_Oracle to work? I ran the .msi installer and it seems to have > worked. But of course when I try to import I get the dreaded DLL error: > > ImportError: DLL load failed: %1 is not a valid Win32 application. > > Is there a way forward for me? Use the 32bit cx_Oracle msi? > > I have followed the advice here: > http://comments.gmane.org/gmane.comp.python.db.cx-oracle/2723 and it > still does not work. > > Thanks. > > > Charlie > > > This email is confidential and subject to important disclaimers and > conditions including on offers for the purchase or sale of securities, > accuracy and completeness of information, viruses, confidentiality, legal > privilege, and legal entity disclaimers, available at > http://www.jpmorgan.com/pages/disclosures/email. > > > ------------------------------------------------------------------------------ > Flow-based real-time traffic analytics software. Cisco certified tool. > Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer > Customize your own dashboards, set traffic alerts and generate reports. > Network behavioral analysis & security monitoring. All-in-one tool. > > http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > -- GHUM GmbH Harald Armin Massa Spielberger Straße 49 70435 Stuttgart 0173/9409607 Amtsgericht Stuttgart, HRB 734971 |
|
From: Harvey, C. N <cha...@jp...> - 2014-02-28 15:15:18
|
Help!
I have no control over my installations because this is a corporate machine (bank). I have a 64bit win7 machine with 64bit Python 2.7. Great! But I checked my Oracle install and it is 32bit. Is there any hope for me getting cx_Oracle to work? I ran the .msi installer and it seems to have worked. But of course when I try to import I get the dreaded DLL error:
ImportError: DLL load failed: %1 is not a valid Win32 application.
Is there a way forward for me? Use the 32bit cx_Oracle msi?
I have followed the advice here: http://comments.gmane.org/gmane.comp.python.db.cx-oracle/2723 and it still does not work.
Thanks.
Charlie
This email is confidential and subject to important disclaimers and conditions including on offers for the purchase or sale of securities, accuracy and completeness of information, viruses, confidentiality, legal privilege, and legal entity disclaimers, available at http://www.jpmorgan.com/pages/disclosures/email.
|
|
From: Walter D. <wa...@li...> - 2014-02-27 13:30:24
|
Hello all!
I'm using cx_Oracle 5.1.2 with Python 3.3.3. When I connect to an
11.2.0.4.0 database and pass the clientinfo parameter I get an ORA-03113
exception. Without the parameter it works. Setting the parameter after
the connection is established works (somewhat):
▸ python
Python 3.3.3 (default, Nov 19 2013, 12:08:16)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import cx_Oracle
>>> db = cx_Oracle.connect("user/pwd@db", clientinfo="foo")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
cx_Oracle.OperationalError: ORA-03113: end-of-file on communication channel
Process ID: 0
Session ID: 0 Serial number: 0
>>> db = cx_Oracle.connect("user/pwd@db")
>>> db.version
'11.2.0.4.0'
>>> db.clientinfo = "foo"
>>>
However when I do a "select distinct client_info from v$session" I don't
see the value "foo".
This bug only happens on 11.2.0.4 databases. Connecting to 11.2.0.3 or
11.2.0.1 instances seems to work (both when passing the clientinfo
parameter in the constructor and when setting it afterwards).
The client is an Oracle Instant client 11.2.0.3 on Mac OS X 10.9.1.
Is this a cx_Oracle or Oracle problem?
Servus,
Walter
|
|
From: 树上 <nor...@ba...> - 2014-02-07 10:21:16
|
树上给您留言了 其发送者及内容只会对您可见,并且您可以随时将其删除。您也可以用信息交换系统来即时回复此信息: http://eu1.badoo.com/0367386611/in/FdwzZjZF6D8/?lang_id=79&g=57-0-4&m=21&mid=52f4b39300000000004f0000030520930130c8e10112 若此信息中的链接无效,请将其复制并粘贴到浏览器地址栏内。 本邮件为树上信息发送过程中的一步。若您误收本邮件,请将其忽略。该信息会稍后从系统中删除。 尽情玩吧! Badoo团队 本邮件来自Badoo Trading Limited(联系地址如下)。 如果您不希望再收到Badoo的邮件,请点击此处取消:https://eu1.badoo.com/impersonation.phtml?lang_id=79&email=cx-oracle-users%40lists.sourceforge.net&block_code=b0f49a&m=21&mid=52f4b39300000000004f0000030520930130c8e10112&g=0-0-4 Badoo Trading Limited注册于英格兰和威尔士,公司号为7540255,注册办公地址为Media Village, 131 - 151 Great Titchfield Street, London, W1W 5BB。 |
|
From: Amos S. <as...@as...> - 2014-02-04 18:19:29
|
This ARRAY support feature is more of a "desirement" than requirement for us but I can probably put some time into this. Any suggestions or guidance as to what patterns or examples to follow would be most appreciated. ----- Original Message ----- From: "Anthony Tuininga" <ant...@gm...> To: cx-...@li... Sent: Monday, February 3, 2014 8:55:14 PM Subject: Re: [cx-oracle-users] arrays outside of plsql Hi, No, there are no known obstacles other than a lack of time. :-) I've been wanting to implement this for a few years now....but since I don't need it for my job it hasn't been a priority. :-( If you want to pursue this I'm more than willing to accept patches! Anthony On Thu, Jan 30, 2014 at 9:44 AM, Amos Smith < as...@as... > wrote: I would like to call db functions that expect array types as input via cx_Oracle. When I try to do this currently I get the error message: ORA-01484: arrays can only be bound to PL/SQL statements I have seen the examples of how to make this work within PL/SQL statements but my goal is to interact with the database via SqlAlchemy user defined types ... such that I can't wrap the command in PL/SQL. I implemented a similar capability in our JDBC based clients using OracleConnection to create ARRAY type. Are there known obstacles to having a feature like this via cx_Oracle (and implicitly DBAPI)? ------------------------------------------------------------------------------ WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk _______________________________________________ cx-oracle-users mailing list cx-...@li... https://lists.sourceforge.net/lists/listinfo/cx-oracle-users ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk _______________________________________________ cx-oracle-users mailing list cx-...@li... https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
|
From: Paul M. <p.f...@gm...> - 2014-02-04 08:16:45
|
On 4 February 2014 04:56, Anthony Tuininga <ant...@gm...> wrote: > No idea about pip and why it is complaining. Something I guess I'll need to > look into. Thanks for the pointer. :-) You need to host the packages on PyPI or have direct pointers to your downloads in the metadata, IIRC. It sounds like you have a "download URL" that points to a webpage that needs scraping. I believe all project owners on PyPI were mailed a few months back about this change (search for "externally hosted") - if you got that email it probably explains better than I just did :-) Paul |
|
From: Anthony T. <ant...@gm...> - 2014-02-04 04:56:21
|
Hi, No idea about pip and why it is complaining. Something I guess I'll need to look into. Thanks for the pointer. :-) Anthony On Mon, Jan 27, 2014 at 7:44 AM, Shai Berger <sh...@pl...> wrote: > It appears you cannot now install cx-oracle via pip without > allowing "insecure and unverifiable" files: > > $ pip install cx_Oracle > Downloading/unpacking cx-Oracle > Could not find any downloads that satisfy the requirement cx-Oracle > Some externally hosted files were ignored (use --allow-external > cx-Oracle to allow). > Cleaning up... > No distributions at all found for cx-Oracle > Storing debug log for failure in /home/heal/.pip/pip.log > > $ pip install cx_Oracle --allow-external cx_Oracle > Downloading/unpacking cx-Oracle > Could not find any downloads that satisfy the requirement cx-Oracle > Some insecure and unverifiable files were ignored (use > --allow-unverified cx-Oracle to allow). > Cleaning up... > No distributions at all found for cx-Oracle > Storing debug log for failure in /home/heal/.pip/pip.log > > $ pip install cx_Oracle --allow-external cx_Oracle --allow-unverified > cx-Oracle > Downloading/unpacking cx-Oracle > cx-Oracle is potentially insecure and unverifiable. > Downloading cx_Oracle-5.1.2.tar.gz (208kB): 208kB downloaded > Running setup.py > (path:/home/heal/VirtEnvs/tester/build/cx-Oracle/setup.py) egg_info for > package cx-Oracle > ... > > That "cx-Oracle is potentially insecure and unverifiable." line, as well > as the previous hints to add the flags, are orange. Messages about > cx-Oracle not being found are red. For users who are asked to install > dependencies of a project/product, this all seems very scary. > > Anthony, is this your doing? Assuming not, can you do anything about it? > > Thanks, > Shai. > > > ------------------------------------------------------------------------------ > CenturyLink Cloud: The Leader in Enterprise Cloud Services. > Learn Why More Businesses Are Choosing CenturyLink Cloud For > Critical Workloads, Development Environments & Everything In Between. > Get a Quote or Start a Free Trial Today. > > http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
|
From: Anthony T. <ant...@gm...> - 2014-02-04 04:55:22
|
Hi, No, there are no known obstacles other than a lack of time. :-) I've been wanting to implement this for a few years now....but since I don't need it for my job it hasn't been a priority. :-( If you want to pursue this I'm more than willing to accept patches! Anthony On Thu, Jan 30, 2014 at 9:44 AM, Amos Smith <as...@as...> wrote: > I would like to call db functions that expect array types as input via > cx_Oracle. > > When I try to do this currently I get the error message: > ORA-01484: arrays can only be bound to PL/SQL statements > > I have seen the examples of how to make this work within PL/SQL statements > but my goal is to interact with the database via SqlAlchemy user defined > types ... such that I can't wrap the command in PL/SQL. > > I implemented a similar capability in our JDBC based clients using > OracleConnection to create ARRAY type. > > Are there known obstacles to having a feature like this via cx_Oracle (and > implicitly DBAPI)? > > > ------------------------------------------------------------------------------ > WatchGuard Dimension instantly turns raw network data into actionable > security intelligence. It gives you real-time visual feedback on key > security issues and trends. Skip the complicated setup - simply import > a virtual appliance and go from zero to informed in seconds. > > http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
|
From: Anthony T. <ant...@gm...> - 2014-02-04 04:53:58
|
Hi, Looks to me like a problem with your Apache configuration. Someone else posted this elsewhere which should help you out. :-) https://code.google.com/p/modwsgi/issues/detail?id=238 When Python Oracle extension was built it wasn't done so with LD_RUN_PATH set in environment so the .so would know were non standard place is that Oracle libraries are installed. As a result, you need to manually set LD_LIBRARY_PATH for Apache so Apache process nows where they are. To do this for standard ASF Apache installation you set: LD_LIBRARY_PATH=/some/path/to/oracle/libs export LD_LIBRARY_PATH in the 'envvars' file in same directory as Apache htttpd executable. Some Linux distributions do away with envvars file and you need to do it somewhere in init scripts for Apache. On Mon, Feb 3, 2014 at 8:17 PM, Thang Vu <Tha...@so...> wrote: > Hello list, > > > > I did install Python extension module cx_Oracle-5.1.2-11g-py26-1.x86_64.rpm > on CentOS 6.4 and linked Oracle client 11gR2 properly. I could run no > problem from Unix shell but I got error from import cx_Oracle > "libclntsh.so.11.1: cannot open shared object file: No such file or > directory" when running from Apache Web Server. > > > > It still failed despite I set ORACLE_HOME and LD_LIBRARY_PATH > ($ORACLE_HOME/lib) properly: in ~/.bashrc, /etc/ld.so.conf.d/oracle.conf, > ~/.bash_profile, anywhere I'm able to set an env var. > > > > Note: I did not have any issue with cx_Oracle when setup the same thing on > CentOS 5, so I suspect cx_Oracle might have running on CentOS 6. > > > > > > > > [root]# uname -a > > Linux zhuhiauto.prod.quest.corp 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 > 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux > > > > [root]# python -V > > Python 2.6.6 > > > > [root]#httpd -V > > Server version: Apache/2.2.15 (Unix) > > Server built: Feb 22 2013 11:19:58 > > Server's Module Magic Number: 20051115:25 > > Server loaded: APR 1.3.9, APR-Util 1.3.9 > > Compiled using: APR 1.3.9, APR-Util 1.3.9 > > Architecture: 64-bit > > Server MPM: Prefork > > threaded: no > > forked: yes (variable process count) > > > > [root]# export ORACLE_HOME=/oracle/products/112 > > [root]# export LD_LIBRARY_PATH=$ORACLE_HOME/lib > > [root]# yum --nogpgcheck install > /home/oracle/cx_Oracle-5.1.2-11g-py26-1.x86_64.rpm > > Loaded plugins: fastestmirror, refresh-packagekit, security > > Loading mirror speeds from cached hostfile > > * base: mirrors.163.com > > * extras: mirror.neu.edu.cn > > * updates: mirrors.163.com > > base > | 3.7 kB 00:00 > > extras > | 3.4 kB 00:00 > > updates > | > 3.4 kB 00:00 > > updates/primary_db > | 1.4 MB 00:00 > > Setting up Install Process > > Examining /home/oracle/cx_Oracle-5.1.2-11g-py26-1.x86_64.rpm: > cx_Oracle-5.1.2-1.x86_64 > > Marking /home/oracle/cx_Oracle-5.1.2-11g-py26-1.x86_64.rpm to be installed > > Resolving Dependencies > > --> Running transaction check > > ---> Package cx_Oracle.x86_64 0:5.1.2-1 will be installed > > --> Finished Dependency Resolution > > > > Dependencies Resolved > > > > > ============================================================================================================================================================ > > Package Arch > Version > Repository Size > > > ============================================================================================================================================================ > > Installing: > > cx_Oracle x86_64 > 5.1.2-1 /cx_Oracle-5.1.2-11g-py26-1.x86_64 > 986 k > > > > Transaction Summary > > > ============================================================================================================================================================ > > Install 1 Package(s) > > > > Total size: 986 k > > Installed size: 986 k > > Is this ok [y/N]: y > > Downloading Packages: > > Running rpm_check_debug > > Running Transaction Test > > Transaction Test Succeeded > > Running Transaction > > Warning: RPMDB altered outside of yum. > > Installing : cx_Oracle-5.1.2-1.x86_64 > 1/1 > > Verifying : > cx_Oracle-5.1.2-1.x86_64 > 1/1 > > > > Installed: > > cx_Oracle.x86_64 0:5.1.2-1 > > Complete! > > > > [root]# rpm -qa |grep cx_Oracle > > cx_Oracle-5.1.2-1.x86_64 > > > > [root]# ldd /usr/lib/python2.6/site-packages/cx_Oracle.so > > linux-vdso.so.1 => (0x00007fffcd9ff000) > > libclntsh.so.11.1 => /oracle/products/112/lib/libclntsh.so.11.1(0x00002b9fc49f7000) > > libpython2.6.so.1.0 => /usr/lib64/libpython2.6.so.1.0 > (0x00002b9fc7393000) > > libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b9fc7739000) > > libc.so.6 => /lib64/libc.so.6 (0x00002b9fc7956000) > > libnnz11.so => /oracle/products/112/lib/libnnz11.so > (0x00002b9fc7cea000) > > libdl.so.2 => /lib64/libdl.so.2 (0x00002b9fc80b6000) > > libm.so.6 => /lib64/libm.so.6 (0x00002b9fc82ba000) > > libnsl.so.1 => /lib64/libnsl.so.1 (0x00002b9fc853f000) > > libaio.so.1 => /lib64/libaio.so.1 (0x00002b9fc8758000) > > libutil.so.1 => /lib64/libutil.so.1 (0x00002b9fc8959000) > > /lib64/ld-linux-x86-64.so.2 (0x0000003997000000) > > [root]# > > > > > > #!/usr/bin/python > > > > import cgi > > import cgitb; cgitb.enable() > > import os, sys > > > > os.putenv('ORACLE_HOME','/oracle/products/112') > > os.putenv('LD_LIBRARY_PATH', '/oracle/products/112/lib') > > os.putenv('TNS_ADMIN','/oracle/products/112/network/admin') > > > > os.environ['ORACLE_HOME'] = '/oracle/products/112' > > os.environ['LD_LIBRARY_PATH'] = '/oracle/products/112/lib' > > os.environ['TNS_ADMIN'] = '/oracle/products/112/network/admin' > > > > import cx_Oracle > > > > > > http://test_server/cgi-bin/cgi_p3.py > > *<type 'exceptions.ImportError'>* > > Python 2.6.6: /usr/bin/python > Tue Feb 4 10:54:00 2014 > > A problem occurred in a Python script. Here is the sequence of function > calls leading up to the error, in the order they occurred. > > /var/www/cgi-bin/cgi_p3.py in () > > 12 os.environ['ORACLE_HOME'] = '/oracle/products/112' > > 13 os.environ['LD_LIBRARY_PATH'] = '/oracle/products/112/lib' > > 14 os.environ['TNS_ADMIN'] = '/oracle/products/112/network/admin' > > 15 > > 16 import cx_Oracle > > cx_Oracle *undefined* > > *<type 'exceptions.ImportError'>*: libclntsh.so.11.1: cannot open shared > object file: No such file or directory > args = ('libclntsh.so.11.1: cannot open shared object file: No such > file or directory',) > message = 'libclntsh.so.11.1: cannot open shared object file: No > such file or directory' > > > > ------------------------------------------------------------------------------ > Managing the Performance of Cloud-Based Applications > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > Read the Whitepaper. > > http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
|
From: Thang Vu <Tha...@so...> - 2014-02-04 03:32:35
|
Hello list,
I did install Python extension module cx_Oracle-5.1.2-11g-py26-1.x86_64.rpm on CentOS 6.4 and linked Oracle client 11gR2 properly. I could run no problem from Unix shell but I got error from import cx_Oracle "libclntsh.so.11.1: cannot open shared object file: No such file or directory" when running from Apache Web Server.
It still failed despite I set ORACLE_HOME and LD_LIBRARY_PATH ($ORACLE_HOME/lib) properly: in ~/.bashrc, /etc/ld.so.conf.d/oracle.conf, ~/.bash_profile, anywhere I'm able to set an env var.
Note: I did not have any issue with cx_Oracle when setup the same thing on CentOS 5, so I suspect cx_Oracle might have running on CentOS 6.
[root]# uname -a
Linux zhuhiauto.prod.quest.corp 2.6.32-358.el6.x86_64 #1 SMP Fri Feb 22 00:31:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root]# python -V
Python 2.6.6
[root]#httpd -V
Server version: Apache/2.2.15 (Unix)
Server built: Feb 22 2013 11:19:58
Server's Module Magic Number: 20051115:25
Server loaded: APR 1.3.9, APR-Util 1.3.9
Compiled using: APR 1.3.9, APR-Util 1.3.9
Architecture: 64-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
[root]# export ORACLE_HOME=/oracle/products/112
[root]# export LD_LIBRARY_PATH=$ORACLE_HOME/lib
[root]# yum --nogpgcheck install /home/oracle/cx_Oracle-5.1.2-11g-py26-1.x86_64.rpm
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: mirror.neu.edu.cn
* updates: mirrors.163.com
base | 3.7 kB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
updates/primary_db | 1.4 MB 00:00
Setting up Install Process
Examining /home/oracle/cx_Oracle-5.1.2-11g-py26-1.x86_64.rpm: cx_Oracle-5.1.2-1.x86_64
Marking /home/oracle/cx_Oracle-5.1.2-11g-py26-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package cx_Oracle.x86_64 0:5.1.2-1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================================================================
Package Arch Version Repository Size
============================================================================================================================================================
Installing:
cx_Oracle x86_64 5.1.2-1 /cx_Oracle-5.1.2-11g-py26-1.x86_64 986 k
Transaction Summary
============================================================================================================================================================
Install 1 Package(s)
Total size: 986 k
Installed size: 986 k
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
Installing : cx_Oracle-5.1.2-1.x86_64 1/1
Verifying : cx_Oracle-5.1.2-1.x86_64 1/1
Installed:
cx_Oracle.x86_64 0:5.1.2-1
Complete!
[root]# rpm -qa |grep cx_Oracle
cx_Oracle-5.1.2-1.x86_64
[root]# ldd /usr/lib/python2.6/site-packages/cx_Oracle.so
linux-vdso.so.1 => (0x00007fffcd9ff000)
libclntsh.so.11.1 => /oracle/products/112/lib/libclntsh.so.11.1 (0x00002b9fc49f7000)
libpython2.6.so.1.0 => /usr/lib64/libpython2.6.so.1.0 (0x00002b9fc7393000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00002b9fc7739000)
libc.so.6 => /lib64/libc.so.6 (0x00002b9fc7956000)
libnnz11.so => /oracle/products/112/lib/libnnz11.so (0x00002b9fc7cea000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002b9fc80b6000)
libm.so.6 => /lib64/libm.so.6 (0x00002b9fc82ba000)
libnsl.so.1 => /lib64/libnsl.so.1 (0x00002b9fc853f000)
libaio.so.1 => /lib64/libaio.so.1 (0x00002b9fc8758000)
libutil.so.1 => /lib64/libutil.so.1 (0x00002b9fc8959000)
/lib64/ld-linux-x86-64.so.2 (0x0000003997000000)
[root]#
#!/usr/bin/python
import cgi
import cgitb; cgitb.enable()
import os, sys
os.putenv('ORACLE_HOME','/oracle/products/112')
os.putenv('LD_LIBRARY_PATH', '/oracle/products/112/lib')
os.putenv('TNS_ADMIN','/oracle/products/112/network/admin')
os.environ['ORACLE_HOME'] = '/oracle/products/112'
os.environ['LD_LIBRARY_PATH'] = '/oracle/products/112/lib'
os.environ['TNS_ADMIN'] = '/oracle/products/112/network/admin'
import cx_Oracle
http://test_server/cgi-bin/cgi_p3.py
<type 'exceptions.ImportError'>
Python 2.6.6: /usr/bin/python
Tue Feb 4 10:54:00 2014
A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
/var/www/cgi-bin/cgi_p3.py<file:///\\var\www\cgi-bin\cgi_p3.py> in ()
12 os.environ['ORACLE_HOME'] = '/oracle/products/112'
13 os.environ['LD_LIBRARY_PATH'] = '/oracle/products/112/lib'
14 os.environ['TNS_ADMIN'] = '/oracle/products/112/network/admin'
15
16 import cx_Oracle
cx_Oracle undefined
<type 'exceptions.ImportError'>: libclntsh.so.11.1: cannot open shared object file: No such file or directory
args = ('libclntsh.so.11.1: cannot open shared object file: No such file or directory',)
message = 'libclntsh.so.11.1: cannot open shared object file: No such file or directory'
|
|
From: Amos S. <as...@as...> - 2014-01-30 16:47:53
|
I would like to call db functions that expect array types as input via cx_Oracle. When I try to do this currently I get the error message: ORA-01484: arrays can only be bound to PL/SQL statements I have seen the examples of how to make this work within PL/SQL statements but my goal is to interact with the database via SqlAlchemy user defined types ... such that I can't wrap the command in PL/SQL. I implemented a similar capability in our JDBC based clients using OracleConnection to create ARRAY type. Are there known obstacles to having a feature like this via cx_Oracle (and implicitly DBAPI)? |