cx-oracle-users Mailing List for cx_Oracle (Page 131)
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: Hancock, D. \(DHANCOCK\) <DHA...@ar...> - 2005-11-01 20:38:36
|
We're using Oracle 10g, Python 2.3, cx_Oracle "HEAD" (sorry no better version number than that, but we picked up the latest version--4.1--earlier this year and compiled against 10g headers). We're seeing counterintuitive behavior with one of our queries (we can't reproduce it with other "biggish" queries). If we construct the query by substituting strings instead of using bind parameters, the query runs 100 times faster! For the same dataset, that's 30 seconds with bind parameters and 0.3 seconds with string substitution. We're holding as much constant as possible (arraysize, for example, is staying at 20). This is repeatable. The furthest we've gotten towards isolating the problem is to learn that we can reproduce the "fix" by only string-substituting the date fields. A few more data points: When we "explain plan" on both versions of the query, we get identical results. When we run both queries in SQL*Plus, we get consistent fast results (< 1 second). But when we run both queries from Python via cx_Oracle, we get the huge discrepancy. We only started noticing this a couple weeks ago, but that doesn't mean it wasn't happening before, we just didn't notice. We've worked around this by changing just this one query to do string substitution, but I'd REALLY like to know what the cause is and fix it. Does this ring a bell for anyone? I'd expect bind-parameter queries to run faster, not slower, and this one is a LOT slower. Cheers! -- David Hancock | dha...@ar... | 410-266-4384=20 |
From: Chris D. <cdu...@ya...> - 2005-10-28 07:55:43
|
Chimezie, Just a quick point your LD_LIBRARY_PATH includes Oracle 7.3.2. Is this correct? I'd guess you'd need to have at least 8.1.7 as cx_Oracle isn't supported against Oracle 7 anymore. HTH Chris --- Chimezie Ogbuji <chi...@gm...> wrote: > I appologize for the repost, but I realized my original subject line > was incorrectly specified (OCI-22054 error using cx_Oracle) and > probably would have the email show up under a defunct thread and not > at the top level: > > I've been struggling for some time to find an easy (non-convoluted) > way to connect to Oracle 8,9, and 10g databases consistently from a > Solaris 8 MP box. For some time I had been using DataDirects Oracle > Wire Protocol drivers with UNIX ODBC and egenix's mxODBC. However, > DataDirect's drivers (which do not require an Oracle Client install - > which is the most attractive thing about them) have since exceeded my > evaluation period, so I'm giving cx_Oracle a shot. > > Following directions from this thread > (http://sourceforge.net/mailarchive/forum.php?thread_id=8719369&forum_id=34464), > I've installed the the Oracle Instant Client, installed the SDK > package, modified the setup.py of cx_Oracle and was able to run python > setup.py install w/out any errors: > > bash-2.03$ python setup.py install > running install > running build > running build_ext > building 'cx_Oracle' extension > creating build > creating build/temp.solaris-2.8-sun4u-2.4 > gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes > -fPIC -I/usr/local/OracleClient/rdbms/demo > -I/usr/local/OracleClient/rdbms/public > -I/usr/local/OracleClient/network/public > -I/usr/local/OracleClient/sdk/include -I/usr/local/include/python2.4 > -c cx_Oracle.c -o build/temp.solaris-2.8-sun4u-2.4/cx_Oracle.o > -DBUILD_TIME="October 27, 2005 10:01:17" > In file included from /usr/local/OracleClient/sdk/include/oci.h:2327, > from cx_Oracle.c:9: > /usr/local/OracleClient/sdk/include/oci1.h:148: warning: function > declaration isn't a prototype > In file included from /usr/local/OracleClient/sdk/include/ociap.h:206, > from /usr/local/OracleClient/sdk/include/oci.h:2351, > from cx_Oracle.c:9: > /usr/local/OracleClient/sdk/include/nzt.h:674: warning: function > declaration isn't a prototype > /usr/local/OracleClient/sdk/include/nzt.h:2665: warning: function > declaration isn't a prototype > /usr/local/OracleClient/sdk/include/nzt.h:2674: warning: function > declaration isn't a prototype > /usr/local/OracleClient/sdk/include/nzt.h:2684: warning: function > declaration isn't a prototype > /usr/local/OracleClient/sdk/include/nzt.h:2693: warning: function > declaration isn't a prototype > /usr/local/OracleClient/sdk/include/nzt.h:2702: warning: function > declaration isn't a prototype > /usr/local/OracleClient/sdk/include/nzt.h:2711: warning: function > declaration isn't a prototype > /usr/local/OracleClient/sdk/include/nzt.h:2719: warning: function > declaration isn't a prototype > /usr/local/OracleClient/sdk/include/nzt.h:2729: warning: function > declaration isn't a prototype > /usr/local/OracleClient/sdk/include/nzt.h:2736: warning: function > declaration isn't a prototype > /usr/local/OracleClient/sdk/include/nzt.h:2744: warning: function > declaration isn't a prototype > In file included from /usr/local/OracleClient/sdk/include/oci.h:2351, > from cx_Oracle.c:9: > /usr/local/OracleClient/sdk/include/ociap.h:9952: warning: function > declaration isn't a prototype > /usr/local/OracleClient/sdk/include/ociap.h:9958: warning: function > declaration isn't a prototype > In file included from Variable.c:93, > from Cursor.c:211, > from Connection.c:303, > from SessionPool.c:132, > from cx_Oracle.c:73: > DateTimeVar.c: In function `DateTimeVar_SetValue': > DateTimeVar.c:81: warning: unused variable `status' > creating build/lib.solaris-2.8-sun4u-2.4 > gcc -shared build/temp.solaris-2.8-sun4u-2.4/cx_Oracle.o > -L/usr/local/OracleClient/lib -L/usr/local/OracleClient -lclntsh -o > build/lib.solaris-2.8-sun4u-2.4/cx_Oracle.so -s > running install_lib > copying build/lib.solaris-2.8-sun4u-2.4/cx_Oracle.so -> > /usr/local/lib/python2.4/site-packages > > However, when I try to run any of the tests (or just try to import the > newly installed cx_Oracle) I get the following symbol reference error: > > bash-2.03$ python test/test.py > Traceback (most recent call last): > File "test/test.py", line 3, in ? > import cx_Oracle > ImportError: ld.so.1: python: fatal: relocation error: file > /usr/local/lib/python2.4/site-packages/cx_Oracle.so: symbol > OCIHandleFree: referenced symbol not found > > I wouldn't expect the build process to complete if there were symbol > reference issues, but I have the Instant Client binaries installed in > /usr/local/OracleClient > , the sdk package installed in /usr/local/OracleClient/sdk, my > ORACLE_HOME variable points to /usr/local/OracleClient, and > LD_LIBRARY_PATH includes /usr/local/OracleClient: > > bash-2.03$ env | grep LD_LIBRARY_PATH > LD_LIBRARY_PATH=/programs/lsf/6.0/sparc-sol7-64/lib:/usr/dt/lib:/vol/oracle/product/7.3.2/lib:/usr/local/lib:/usr/lib:/usr/ccs/lib:/usr/local/pgsql/lib:/usr/local/mysql/lib:/usr/local/lib:/usr/lib:/usr/ccs/lib:/usr/local/pgsql/lib:/usr/local/OracleClient > bash-2.03$ env | grep ORACLE_HOME > ORACLE_HOME=/usr/local/OracleClient > > I'm not sure why it's unable to resolve the symbol. Any help would be > greatly appreciated > > Chimezie > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course > Free Certification Exam for All Training Attendees Through End of 2005 > Visit http://www.jboss.com/services/certification for more information > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com |
From: Chimezie O. <chi...@gm...> - 2005-10-27 20:58:38
|
I appologize for the repost, but I realized my original subject line was incorrectly specified (OCI-22054 error using cx_Oracle) and probably would have the email show up under a defunct thread and not at the top level: I've been struggling for some time to find an easy (non-convoluted) way to connect to Oracle 8,9, and 10g databases consistently from a Solaris 8 MP box. For some time I had been using DataDirects Oracle Wire Protocol drivers with UNIX ODBC and egenix's mxODBC. However, DataDirect's drivers (which do not require an Oracle Client install - which is the most attractive thing about them) have since exceeded my evaluation period, so I'm giving cx_Oracle a shot. Following directions from this thread (http://sourceforge.net/mailarchive/forum.php?thread_id=3D8719369&forum_id= =3D34464), I've installed the the Oracle Instant Client, installed the SDK package, modified the setup.py of cx_Oracle and was able to run python setup.py install w/out any errors: bash-2.03$ python setup.py install running install running build running build_ext building 'cx_Oracle' extension creating build creating build/temp.solaris-2.8-sun4u-2.4 gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/OracleClient/rdbms/demo -I/usr/local/OracleClient/rdbms/public -I/usr/local/OracleClient/network/public -I/usr/local/OracleClient/sdk/include -I/usr/local/include/python2.4 -c cx_Oracle.c -o build/temp.solaris-2.8-sun4u-2.4/cx_Oracle.o -DBUILD_TIME=3D"October 27, 2005 10:01:17" In file included from /usr/local/OracleClient/sdk/include/oci.h:2327, from cx_Oracle.c:9: /usr/local/OracleClient/sdk/include/oci1.h:148: warning: function declaration isn't a prototype In file included from /usr/local/OracleClient/sdk/include/ociap.h:206, from /usr/local/OracleClient/sdk/include/oci.h:2351, from cx_Oracle.c:9: /usr/local/OracleClient/sdk/include/nzt.h:674: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2665: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2674: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2684: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2693: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2702: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2711: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2719: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2729: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2736: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2744: warning: function declaration isn't a prototype In file included from /usr/local/OracleClient/sdk/include/oci.h:2351, from cx_Oracle.c:9: /usr/local/OracleClient/sdk/include/ociap.h:9952: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/ociap.h:9958: warning: function declaration isn't a prototype In file included from Variable.c:93, from Cursor.c:211, from Connection.c:303, from SessionPool.c:132, from cx_Oracle.c:73: DateTimeVar.c: In function `DateTimeVar_SetValue': DateTimeVar.c:81: warning: unused variable `status' creating build/lib.solaris-2.8-sun4u-2.4 gcc -shared build/temp.solaris-2.8-sun4u-2.4/cx_Oracle.o -L/usr/local/OracleClient/lib -L/usr/local/OracleClient -lclntsh -o build/lib.solaris-2.8-sun4u-2.4/cx_Oracle.so -s running install_lib copying build/lib.solaris-2.8-sun4u-2.4/cx_Oracle.so -> /usr/local/lib/python2.4/site-packages However, when I try to run any of the tests (or just try to import the newly installed cx_Oracle) I get the following symbol reference error: bash-2.03$ python test/test.py Traceback (most recent call last): File "test/test.py", line 3, in ? import cx_Oracle ImportError: ld.so.1: python: fatal: relocation error: file /usr/local/lib/python2.4/site-packages/cx_Oracle.so: symbol OCIHandleFree: referenced symbol not found I wouldn't expect the build process to complete if there were symbol reference issues, but I have the Instant Client binaries installed in /usr/local/OracleClient , the sdk package installed in /usr/local/OracleClient/sdk, my ORACLE_HOME variable points to /usr/local/OracleClient, and LD_LIBRARY_PATH includes /usr/local/OracleClient: bash-2.03$ env | grep LD_LIBRARY_PATH LD_LIBRARY_PATH=3D/programs/lsf/6.0/sparc-sol7-64/lib:/usr/dt/lib:/vol/orac= le/product/7.3.2/lib:/usr/local/lib:/usr/lib:/usr/ccs/lib:/usr/local/pgsql/= lib:/usr/local/mysql/lib:/usr/local/lib:/usr/lib:/usr/ccs/lib:/usr/local/pg= sql/lib:/usr/local/OracleClient bash-2.03$ env | grep ORACLE_HOME ORACLE_HOME=3D/usr/local/OracleClient I'm not sure why it's unable to resolve the symbol. Any help would be greatly appreciated Chimezie |
From: Chimezie O. <chi...@gm...> - 2005-10-27 14:05:16
|
I've been struggling for some time to find an easy (non-convoluted) way to connect to Oracle 8,9, and 10g databases consistently from a Solaris 8 MP box. For some time I had been using DataDirects Oracle Wire Protocol drivers with UNIX ODBC and egenix's mxODBC. However, DataDirect's drivers (which do not require an Oracle Client install - which is the most attractive thing about them) have since exceeded my evaluation period, so I'm giving cx_Oracle a shot. Following directions from this thread (http://sourceforge.net/mailarchive/forum.php?thread_id=3D8719369&forum_id= =3D34464), I've installed the the Oracle Instant Client, installed the SDK package, modified the setup.py of cx_Oracle and was able to run python setup.py install w/out any errors: bash-2.03$ python setup.py install running install running build running build_ext building 'cx_Oracle' extension creating build creating build/temp.solaris-2.8-sun4u-2.4 gcc -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/OracleClient/rdbms/demo -I/usr/local/OracleClient/rdbms/public -I/usr/local/OracleClient/network/public -I/usr/local/OracleClient/sdk/include -I/usr/local/include/python2.4 -c cx_Oracle.c -o build/temp.solaris-2.8-sun4u-2.4/cx_Oracle.o -DBUILD_TIME=3D"October 27, 2005 10:01:17" In file included from /usr/local/OracleClient/sdk/include/oci.h:2327, from cx_Oracle.c:9: /usr/local/OracleClient/sdk/include/oci1.h:148: warning: function declaration isn't a prototype In file included from /usr/local/OracleClient/sdk/include/ociap.h:206, from /usr/local/OracleClient/sdk/include/oci.h:2351, from cx_Oracle.c:9: /usr/local/OracleClient/sdk/include/nzt.h:674: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2665: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2674: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2684: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2693: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2702: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2711: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2719: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2729: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2736: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/nzt.h:2744: warning: function declaration isn't a prototype In file included from /usr/local/OracleClient/sdk/include/oci.h:2351, from cx_Oracle.c:9: /usr/local/OracleClient/sdk/include/ociap.h:9952: warning: function declaration isn't a prototype /usr/local/OracleClient/sdk/include/ociap.h:9958: warning: function declaration isn't a prototype In file included from Variable.c:93, from Cursor.c:211, from Connection.c:303, from SessionPool.c:132, from cx_Oracle.c:73: DateTimeVar.c: In function `DateTimeVar_SetValue': DateTimeVar.c:81: warning: unused variable `status' creating build/lib.solaris-2.8-sun4u-2.4 gcc -shared build/temp.solaris-2.8-sun4u-2.4/cx_Oracle.o -L/usr/local/OracleClient/lib -L/usr/local/OracleClient -lclntsh -o build/lib.solaris-2.8-sun4u-2.4/cx_Oracle.so -s running install_lib copying build/lib.solaris-2.8-sun4u-2.4/cx_Oracle.so -> /usr/local/lib/python2.4/site-packages However, when I try to run any of the tests (or just try to import the newly installed cx_Oracle) I get the following symbol reference error: bash-2.03$ python test/test.py Traceback (most recent call last): File "test/test.py", line 3, in ? import cx_Oracle ImportError: ld.so.1: python: fatal: relocation error: file /usr/local/lib/python2.4/site-packages/cx_Oracle.so: symbol OCIHandleFree: referenced symbol not found I wouldn't expect the build process to complete if there were symbol reference issues, but I have the Instant Client binaries installed in /usr/local/OracleClient , the sdk package installed in /usr/local/OracleClient/sdk, my ORACLE_HOME variable points to /usr/local/OracleClient, and LD_LIBRARY_PATH includes /usr/local/OracleClient: bash-2.03$ env | grep LD_LIBRARY_PATH LD_LIBRARY_PATH=3D/programs/lsf/6.0/sparc-sol7-64/lib:/usr/dt/lib:/vol/orac= le/product/7.3.2/lib:/usr/local/lib:/usr/lib:/usr/ccs/lib:/usr/local/pgsql/= lib:/usr/local/mysql/lib:/usr/local/lib:/usr/lib:/usr/ccs/lib:/usr/local/pg= sql/lib:/usr/local/OracleClient bash-2.03$ env | grep ORACLE_HOME ORACLE_HOME=3D/usr/local/OracleClient I'm not sure why it's unable to resolve the symbol. Any help would be greatly appreciated Chimezie |
From: Anthony T. <ant...@gm...> - 2005-10-26 13:55:35
|
At a guess libclntsh.so.8.0 is not in your library search path. You can determine this by running "ldd cx_Oracle.so" and noting that it can't find libclntsh.so.8.0. You can fix this by setting LD_LIBRARY_PATH or by setting the system wide library search path. You can also (although this ties it to your particular Oracle installation) use the rpath directive. The setup.py in cx_Oracle 4.1 looks for the environment variable "FORCE_RPATH" to set this up. Hope that helps. On 10/26/05, Gustavo Rahal <gu...@gr...> wrote: > Hi all > > I was trying to run cx_Oracle and got error. Output below. > The system is running RedHat 7.2, activepython 2.4 > > > [rmsplus@dksl0013 cx_Oracle-4.1]$ ../python24/bin/python setup.py install > running install > running build > running build_ext > building 'cx_Oracle' extension > creating build > creating build/temp.linux-i686-2.4 > gcc -pthread -fno-strict-aliasing -fPIC -DNDEBUG -g -O3 -Wall > -Wstrict-prototypes -fPIC -I/opt/oracle/rdbms/demo > -I/opt/oracle/rdbms/public -I/opt/oracle/network/public > -I/home/rmsplus/python24/include/python2.4 -c cx_Oracle.c -o > build/temp.linux-i686-2.4/cx_Oracle.o -DBUILD_TIME=3D"October 26, 2005 > 06:53:39" > In file included from /opt/oracle/rdbms/demo/oci.h:1623, > from cx_Oracle.c:9: > /opt/oracle/rdbms/demo/oci1.h:148: warning: function declaration isn't a > prototype > In file included from /opt/oracle/rdbms/demo/oci.h:1648, > from cx_Oracle.c:9: > /opt/oracle/rdbms/demo/ociap.h:6266: warning: function declaration isn't > a prototype > /opt/oracle/rdbms/demo/ociap.h:8748: warning: function declaration isn't > a prototype > /opt/oracle/rdbms/demo/ociap.h:8754: warning: function declaration isn't > a prototype > In file included from Variable.c:89, > from Cursor.c:211, > from Connection.c:303, > from cx_Oracle.c:75: > NumberVar.c: In function `NumberVar_SetValue': > NumberVar.c:178: warning: passing arg 4 of `OCINumberFromText' discards > qualifiers from pointer target type > In file included from Variable.c:93, > from Cursor.c:211, > from Connection.c:303, > from cx_Oracle.c:75: > DateTimeVar.c: In function `DateTimeVar_SetValue': > DateTimeVar.c:81: warning: unused variable `status' > In file included from Connection.c:304, > from cx_Oracle.c:75: > Callback.c: In function `Callback_BindByNameArgs': > Callback.c:78: warning: value computed is not used > Callback.c:79: warning: value computed is not used > Callback.c: In function `Callback_DefineByPosArgs': > Callback.c:123: warning: value computed is not used > Callback.c:124: warning: value computed is not used > Callback.c: In function `Callback_ExecuteArgs': > Callback.c:155: warning: value computed is not used > Callback.c:157: warning: value computed is not used > Callback.c: In function `Callback_FetchArgs': > Callback.c:178: warning: value computed is not used > Callback.c: In function `Callback_PrepareArgs': > Callback.c:203: warning: value computed is not used > creating build/lib.linux-i686-2.4 > gcc -pthread -shared build/temp.linux-i686-2.4/cx_Oracle.o > -L/opt/oracle/lib -lclntsh -o build/lib.linux-i686-2.4/cx_Oracle.so -s > running install_lib > copying build/lib.linux-i686-2.4/cx_Oracle.so -> > /home/rmsplus/python24/lib/python2.4/site-packages > > [rmsplus@dksl0013 cx_Oracle-4.1]$ ../python24/bin/python > ActivePython 2.4.1 Build 247 (ActiveState Corp.) based on > Python 2.4.1 (#1, Jun 20 2005, 17:00:29) > [GCC 2.95.3 20010315 (SuSE)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import cx_Oracle > Traceback (most recent call last): > File "<stdin>", line 1, in ? > ImportError: libclntsh.so.8.0: cannot open shared object file: No such > file or directory > >>> > > > Any ideas? > > > Thanks > Gustavo > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course > Free Certification Exam for All Training Attendees Through End of 2005 > Visit http://www.jboss.com/services/certification for more information > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Anthony T. <ant...@gm...> - 2005-10-26 13:52:46
|
Oops. You're right. Expire time is what I was thinking of but that is only for expiring idle sessions as you said. So I believe there is no way of doing this directly using Oracle alone. If anyone knows otherwise, I'd be happy to be enlightened. :-) On 10/25/05, Molina, Gerardo <Ger...@sc...> wrote: > The only parameter I'm aware of relating to timeout on sqlnet is > sqlnet.expire_time. But this is for disconnecting idle sessions after a > specified amount of time. This is not exactly what I'm looking for - > terminating an attempted connect after a specified amount of time. > > I very much appreciate the insightful feedback everyone has given > already. > > Thanks, > Gerardo > > -----Original Message----- > From: cx-...@li... > [mailto:cx-...@li...] On Behalf Of Paul > Moore > Sent: Tuesday, October 25, 2005 12:46 PM > To: cx-...@li... > Subject: Re: [cx-oracle-users] Time out parameter for connect? > > On 10/25/05, Anthony Tuininga <ant...@gm...> wrote: > > I don't believe there is any method in the OCI that allows you to > > specify this value. Googling certainly suggests as much (others have > > asked for this capability and been told that it does not exist). Note > > that SQL*Net does allow you to specify such things so perhaps you need > > > to look at the SQL*Net configuration. > > I have certainly wanted this and never found a suitable way of managing > it. > > You can do the connect in a thread, and wait for the thread to complete > for a set time. If the connection hasn't been made by then, you can do > whatever you want on a timeout (report an error, whatever). > But if you then want to end your program, you'll need to wait for the > thread - if you don't (for example, by making the thread a daemon) I've > found you can get odd crashes or other errors (I never worked out why, > or managed to put together a useful test case - I just marked it down as > "don't do that"). > > I'm not quite sure how you configure SQL*Net to time out after a given > period. I remember looking, but I don't recall finding any suitable > parameter. > > Paul. > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course Free > Certification Exam for All Training Attendees Through End of 2005 Visit > http://www.jboss.com/services/certification for more information > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course > Free Certification Exam for All Training Attendees Through End of 2005 > Visit http://www.jboss.com/services/certification for more information > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Gustavo R. <gu...@gr...> - 2005-10-26 12:05:21
|
Hi all I was trying to run cx_Oracle and got error. Output below. The system is running RedHat 7.2, activepython 2.4 [rmsplus@dksl0013 cx_Oracle-4.1]$ ../python24/bin/python setup.py install running install running build running build_ext building 'cx_Oracle' extension creating build creating build/temp.linux-i686-2.4 gcc -pthread -fno-strict-aliasing -fPIC -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/opt/oracle/rdbms/demo -I/opt/oracle/rdbms/public -I/opt/oracle/network/public -I/home/rmsplus/python24/include/python2.4 -c cx_Oracle.c -o build/temp.linux-i686-2.4/cx_Oracle.o -DBUILD_TIME="October 26, 2005 06:53:39" In file included from /opt/oracle/rdbms/demo/oci.h:1623, from cx_Oracle.c:9: /opt/oracle/rdbms/demo/oci1.h:148: warning: function declaration isn't a prototype In file included from /opt/oracle/rdbms/demo/oci.h:1648, from cx_Oracle.c:9: /opt/oracle/rdbms/demo/ociap.h:6266: warning: function declaration isn't a prototype /opt/oracle/rdbms/demo/ociap.h:8748: warning: function declaration isn't a prototype /opt/oracle/rdbms/demo/ociap.h:8754: warning: function declaration isn't a prototype In file included from Variable.c:89, from Cursor.c:211, from Connection.c:303, from cx_Oracle.c:75: NumberVar.c: In function `NumberVar_SetValue': NumberVar.c:178: warning: passing arg 4 of `OCINumberFromText' discards qualifiers from pointer target type In file included from Variable.c:93, from Cursor.c:211, from Connection.c:303, from cx_Oracle.c:75: DateTimeVar.c: In function `DateTimeVar_SetValue': DateTimeVar.c:81: warning: unused variable `status' In file included from Connection.c:304, from cx_Oracle.c:75: Callback.c: In function `Callback_BindByNameArgs': Callback.c:78: warning: value computed is not used Callback.c:79: warning: value computed is not used Callback.c: In function `Callback_DefineByPosArgs': Callback.c:123: warning: value computed is not used Callback.c:124: warning: value computed is not used Callback.c: In function `Callback_ExecuteArgs': Callback.c:155: warning: value computed is not used Callback.c:157: warning: value computed is not used Callback.c: In function `Callback_FetchArgs': Callback.c:178: warning: value computed is not used Callback.c: In function `Callback_PrepareArgs': Callback.c:203: warning: value computed is not used creating build/lib.linux-i686-2.4 gcc -pthread -shared build/temp.linux-i686-2.4/cx_Oracle.o -L/opt/oracle/lib -lclntsh -o build/lib.linux-i686-2.4/cx_Oracle.so -s running install_lib copying build/lib.linux-i686-2.4/cx_Oracle.so -> /home/rmsplus/python24/lib/python2.4/site-packages [rmsplus@dksl0013 cx_Oracle-4.1]$ ../python24/bin/python ActivePython 2.4.1 Build 247 (ActiveState Corp.) based on Python 2.4.1 (#1, Jun 20 2005, 17:00:29) [GCC 2.95.3 20010315 (SuSE)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import cx_Oracle Traceback (most recent call last): File "<stdin>", line 1, in ? ImportError: libclntsh.so.8.0: cannot open shared object file: No such file or directory >>> Any ideas? Thanks Gustavo |
From: Molina, G. <Ger...@sc...> - 2005-10-25 20:21:40
|
The only parameter I'm aware of relating to timeout on sqlnet is sqlnet.expire_time. But this is for disconnecting idle sessions after a specified amount of time. This is not exactly what I'm looking for - terminating an attempted connect after a specified amount of time. I very much appreciate the insightful feedback everyone has given already. Thanks, Gerardo=20 -----Original Message----- From: cx-...@li... [mailto:cx-...@li...] On Behalf Of Paul Moore Sent: Tuesday, October 25, 2005 12:46 PM To: cx-...@li... Subject: Re: [cx-oracle-users] Time out parameter for connect? On 10/25/05, Anthony Tuininga <ant...@gm...> wrote: > I don't believe there is any method in the OCI that allows you to=20 > specify this value. Googling certainly suggests as much (others have=20 > asked for this capability and been told that it does not exist). Note=20 > that SQL*Net does allow you to specify such things so perhaps you need > to look at the SQL*Net configuration. I have certainly wanted this and never found a suitable way of managing it. You can do the connect in a thread, and wait for the thread to complete for a set time. If the connection hasn't been made by then, you can do whatever you want on a timeout (report an error, whatever). But if you then want to end your program, you'll need to wait for the thread - if you don't (for example, by making the thread a daemon) I've found you can get odd crashes or other errors (I never worked out why, or managed to put together a useful test case - I just marked it down as "don't do that"). I'm not quite sure how you configure SQL*Net to time out after a given period. I remember looking, but I don't recall finding any suitable parameter. Paul. ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ cx-oracle-users mailing list cx-...@li... https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Paul M. <p.f...@gm...> - 2005-10-25 19:46:24
|
On 10/25/05, Anthony Tuininga <ant...@gm...> wrote: > I don't believe there is any method in the OCI that allows you to > specify this value. Googling certainly suggests as much (others have > asked for this capability and been told that it does not exist). Note > that SQL*Net does allow you to specify such things so perhaps you need > to look at the SQL*Net configuration. I have certainly wanted this and never found a suitable way of managing it. You can do the connect in a thread, and wait for the thread to complete for a set time. If the connection hasn't been made by then, you can do whatever you want on a timeout (report an error, whatever). But if you then want to end your program, you'll need to wait for the thread - if you don't (for example, by making the thread a daemon) I've found you can get odd crashes or other errors (I never worked out why, or managed to put together a useful test case - I just marked it down as "don't do that"). I'm not quite sure how you configure SQL*Net to time out after a given period. I remember looking, but I don't recall finding any suitable parameter. Paul. |
From: Anthony T. <ant...@gm...> - 2005-10-25 17:28:54
|
I don't believe there is any method in the OCI that allows you to specify this value. Googling certainly suggests as much (others have asked for this capability and been told that it does not exist). Note that SQL*Net does allow you to specify such things so perhaps you need to look at the SQL*Net configuration. On 10/25/05, Richard Moore <ri...@we...> wrote: > > > Molina, Gerardo wrote: > > What I was looking for was a timeout associated with an attempted > > connect, not a timeout for after the connection is established. > > Basically, I'm trying to reduce the the time spent waiting for a TCP > > timeout if host is off the air. I was looking for something like the > > timeout parameter in the pexpect module. > > You use an alarm call, possibly something like > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/307871 > but I guess this might lead to a resource leak. > > Rich. > -- > Richard Moore, Principal Software Engineer, > Westpoint Ltd, > Albion Wharf, 19 Albion Street, Manchester, M1 5LN, England > Tel: +44 161 237 1028 > Fax: +44 161 237 1031 > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course > Free Certification Exam for All Training Attendees Through End of 2005 > Visit http://www.jboss.com/services/certification for more information > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Richard M. <ri...@we...> - 2005-10-25 15:39:59
|
Molina, Gerardo wrote: > What I was looking for was a timeout associated with an attempted > connect, not a timeout for after the connection is established. > Basically, I'm trying to reduce the the time spent waiting for a TCP > timeout if host is off the air. I was looking for something like the > timeout parameter in the pexpect module. You use an alarm call, possibly something like http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/307871 but I guess this might lead to a resource leak. Rich. -- Richard Moore, Principal Software Engineer, Westpoint Ltd, Albion Wharf, 19 Albion Street, Manchester, M1 5LN, England Tel: +44 161 237 1028 Fax: +44 161 237 1031 |
From: Molina, G. <Ger...@sc...> - 2005-10-25 15:34:42
|
What I was looking for was a timeout associated with an attempted connect, not a timeout for after the connection is established. Basically, I'm trying to reduce the the time spent waiting for a TCP timeout if host is off the air. I was looking for something like the timeout parameter in the pexpect module. Thanks, Gerardo=20 -----Original Message----- From: cx-...@li... [mailto:cx-...@li...] On Behalf Of Anthony Tuininga Sent: Tuesday, October 25, 2005 7:06 AM To: cx-...@li... Subject: Re: [cx-oracle-users] Time out parameter for connect? Hmm, I think more information is definitely needed. What precisely do you want? A timeout on the actual connect itself? A timeout on each statement that is executed by the connection? A timeout on something else? The only OCI (Oracle Call Interface) method that deals with timeouts is OCITransStart() and requires implicit transactions started for you. Be aware of another option (depending on your needs) in the creation of profiles on the Oracle database -- those allow you to specify a fair number of parameters. On 10/24/05, Molina, Gerardo <Ger...@sc...> wrote: > Anthony, > > Thanks for the quick response. > > I'd like to be able to specify a timeout parameter as in this example: > > connection =3D cx_Oracle.connect(user,password,dbstring,timeout) > > where the connection would timeout after timeout expires. > > This would allow you to control max time per connection call. > > Do you need any more information? > > Thanks, > Gerardo > -----Original Message----- > From: cx-...@li... > [mailto:cx-...@li...] On Behalf Of=20 > Anthony Tuininga > Sent: Monday, October 24, 2005 2:00 PM > To: cx-...@li... > Subject: Re: [cx-oracle-users] Time out parameter for connect? > > Could you provide more information about what you desire? A quick=20 > Google search indicates that there is a "timeout" parameter for the > OCITransStart() call but that's all. Is that what you are referring to? > If not, what are you referring to? Depending on what you need and what > platform you are running on, one option is to create a thread with a=20 > timer and upon the expiration of the timer cancel the cursor if its=20 > still running. You can't do this on Windows -- you probably need the > OCITransSatart() call for that purpose. Its not wrapped by cx_Oracle=20 > today so I'd need more information if you want me to implement it. > > On 10/24/05, Molina, Gerardo <Ger...@sc...> wrote: > > > > > > Is there a way to specify a timeout parameter to the connect method? > > > > Or, is there another way to incorporate a timeout parameter for > cx_Oracle? > > > > Thanks, > > Gerardo > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course Free=20 > Certification Exam for All Training Attendees Through End of 2005=20 > Visit http://www.jboss.com/services/certification for more information > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course Free=20 > Certification Exam for All Training Attendees Through End of 2005=20 > Visit http://www.jboss.com/services/certification for more information > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ cx-oracle-users mailing list cx-...@li... https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Anthony T. <ant...@gm...> - 2005-10-25 14:06:18
|
Hmm, I think more information is definitely needed. What precisely do you want? A timeout on the actual connect itself? A timeout on each statement that is executed by the connection? A timeout on something else? The only OCI (Oracle Call Interface) method that deals with timeouts is OCITransStart() and requires implicit transactions started for you. Be aware of another option (depending on your needs) in the creation of profiles on the Oracle database -- those allow you to specify a fair number of parameters. On 10/24/05, Molina, Gerardo <Ger...@sc...> wrote: > Anthony, > > Thanks for the quick response. > > I'd like to be able to specify a timeout parameter as in this example: > > connection =3D cx_Oracle.connect(user,password,dbstring,timeout) > > where the connection would timeout after timeout expires. > > This would allow you to control max time per connection call. > > Do you need any more information? > > Thanks, > Gerardo > -----Original Message----- > From: cx-...@li... > [mailto:cx-...@li...] On Behalf Of > Anthony Tuininga > Sent: Monday, October 24, 2005 2:00 PM > To: cx-...@li... > Subject: Re: [cx-oracle-users] Time out parameter for connect? > > Could you provide more information about what you desire? A quick Google > search indicates that there is a "timeout" parameter for the > OCITransStart() call but that's all. Is that what you are referring to? > If not, what are you referring to? Depending on what you need and what > platform you are running on, one option is to create a thread with a > timer and upon the expiration of the timer cancel the cursor if its > still running. You can't do this on Windows -- you probably need the > OCITransSatart() call for that purpose. Its not wrapped by cx_Oracle > today so I'd need more information if you want me to implement it. > > On 10/24/05, Molina, Gerardo <Ger...@sc...> wrote: > > > > > > Is there a way to specify a timeout parameter to the connect method? > > > > Or, is there another way to incorporate a timeout parameter for > cx_Oracle? > > > > Thanks, > > Gerardo > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course Free > Certification Exam for All Training Attendees Through End of 2005 Visit > http://www.jboss.com/services/certification for more information > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course > Free Certification Exam for All Training Attendees Through End of 2005 > Visit http://www.jboss.com/services/certification for more information > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Molina, G. <Ger...@sc...> - 2005-10-24 22:52:02
|
Anthony, Thanks for the quick response. I'd like to be able to specify a timeout parameter as in this example: connection =3D cx_Oracle.connect(user,password,dbstring,timeout)=20 where the connection would timeout after timeout expires. This would allow you to control max time per connection call. Do you need any more information? Thanks, Gerardo -----Original Message----- From: cx-...@li... [mailto:cx-...@li...] On Behalf Of Anthony Tuininga Sent: Monday, October 24, 2005 2:00 PM To: cx-...@li... Subject: Re: [cx-oracle-users] Time out parameter for connect? Could you provide more information about what you desire? A quick Google search indicates that there is a "timeout" parameter for the OCITransStart() call but that's all. Is that what you are referring to? If not, what are you referring to? Depending on what you need and what platform you are running on, one option is to create a thread with a timer and upon the expiration of the timer cancel the cursor if its still running. You can't do this on Windows -- you probably need the OCITransSatart() call for that purpose. Its not wrapped by cx_Oracle today so I'd need more information if you want me to implement it. On 10/24/05, Molina, Gerardo <Ger...@sc...> wrote: > > > Is there a way to specify a timeout parameter to the connect method? > > Or, is there another way to incorporate a timeout parameter for cx_Oracle? > > Thanks, > Gerardo ------------------------------------------------------- This SF.Net email is sponsored by the JBoss Inc. Get Certified Today * Register for a JBoss Training Course Free Certification Exam for All Training Attendees Through End of 2005 Visit http://www.jboss.com/services/certification for more information _______________________________________________ cx-oracle-users mailing list cx-...@li... https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Anthony T. <ant...@gm...> - 2005-10-24 22:26:58
|
No particularly good reason -- it just happens to be a way of indicating that there should be one and only one entry in the list. An exception is raised if there is not whereas args[0] does not raise the exception. Its an open question which is the better code. Any further comments? On 10/24/05, Guido van Rossum <gu...@el...> wrote: > > try: > > cursor.execute("select 1 / 0 from dual") > > except cx_Oracle.DatabaseError, e: > > print "Exception:", e # this is what you are looking at > > right now > > errorObj, =3D e.args # this is the actual "error" > > This is overly subtle. Why not write > > errorObj =3D e.args[0] > > ? I can't think of a situation where that wouldn't work and the former > would. > > > that cx_Oracle raises > > print "ErrorCode:", errorObj.code > > print "ErrorMessage:", errorObj.message > > --Guido van Rossum > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course > Free Certification Exam for All Training Attendees Through End of 2005 > Visit http://www.jboss.com/services/certification for more information > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Guido v. R. <gu...@el...> - 2005-10-24 21:56:03
|
> try: > cursor.execute("select 1 / 0 from dual") > except cx_Oracle.DatabaseError, e: > print "Exception:", e # this is what you are looking at=20 > right now > errorObj, =3D e.args # this is the actual "error"=20 This is overly subtle. Why not write errorObj =3D e.args[0] ? I can't think of a situation where that wouldn't work and the former would. > that cx_Oracle raises > print "ErrorCode:", errorObj.code > print "ErrorMessage:", errorObj.message --Guido van Rossum |
From: Anthony T. <ant...@gm...> - 2005-10-24 21:52:35
|
You want to do something like this: try: cursor.execute("select 1 / 0 from dual") except cx_Oracle.DatabaseError, e: print "Exception:", e # this is what you are looking at right now errorObj, =3D e.args # this is the actual "error" that cx_Oracle = raises print "ErrorCode:", errorObj.code print "ErrorMessage:", errorObj.message Hope that helps. On 10/24/05, Mark Harrison <mh...@pi...> wrote: > Right now I'm doing this, which works but seems a bit fragile. > Is there a better way to do this? > > try: > conn =3D cx_Oracle.connect(user, passwd, connurl) > except cx_Oracle.DatabaseError, e: > oranum=3Dstr(e).split(':')[0] > print 'oranum=3D/%s/'%(oranum) > > oranum=3D/ORA-01017/ > > Many TIA! > Mark > > -- > Mark Harrison > Pixar Animation Studios > > > ------------------------------------------------------- > This SF.Net email is sponsored by the JBoss Inc. > Get Certified Today * Register for a JBoss Training Course > Free Certification Exam for All Training Attendees Through End of 2005 > Visit http://www.jboss.com/services/certification for more information > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Mark H. <mh...@pi...> - 2005-10-24 21:25:55
|
Right now I'm doing this, which works but seems a bit fragile. Is there a better way to do this? try: conn = cx_Oracle.connect(user, passwd, connurl) except cx_Oracle.DatabaseError, e: oranum=str(e).split(':')[0] print 'oranum=/%s/'%(oranum) oranum=/ORA-01017/ Many TIA! Mark -- Mark Harrison Pixar Animation Studios |
From: Anthony T. <ant...@gm...> - 2005-10-24 21:00:17
|
Could you provide more information about what you desire? A quick Google search indicates that there is a "timeout" parameter for the OCITransStart() call but that's all. Is that what you are referring to? If not, what are you referring to? Depending on what you need and what platform you are running on, one option is to create a thread with a timer and upon the expiration of the timer cancel the cursor if its still running. You can't do this on Windows -- you probably need the OCITransSatart() call for that purpose. Its not wrapped by cx_Oracle today so I'd need more information if you want me to implement it. On 10/24/05, Molina, Gerardo <Ger...@sc...> wrote: > > > Is there a way to specify a timeout parameter to the connect method? > > Or, is there another way to incorporate a timeout parameter for cx_Oracle= ? > > Thanks, > Gerardo |
From: Molina, G. <Ger...@sc...> - 2005-10-24 19:40:43
|
Is there a way to specify a timeout parameter to the connect method? Or, is there another way to incorporate a timeout parameter for cx_Oracle? Thanks, Gerardo |
From: Anthony T. <ant...@gm...> - 2005-10-24 15:58:44
|
Take a look at the fragment in test/CursorVar.py. I'll replicate the relevant portion here for your convenience. cursor =3D self.connection.cursor() self.cursor.callproc("pkg_TestOutCursors.TestOutCursor", (2, cursor= )) In other words, simply create a cursor and bind it to the procedure using the callproc method. Hope that helps. On 10/24/05, Di...@ao... <Di...@ao...> wrote: > > I got Oracle stored procedure, which looks like: > > PROCEDURE get_list(param1 IN VARCHAR2, param2 IN VARCHAR2, summary_cur OU= T > REFCUR). > IS > sql_stmt VARCHAR2(4000); > BEGIN > sql_stmt =3D 'SELECT a,b,c,d FROM Tab1, Tab2 WHERE Tab1.x =3D :param1 AND= Tab2.y > =3D :param2;' > OPEN summary_cur FOR sql_stmt USING param1, param2; > END get_list; > > Usually it returns more than 1 row. > > How can call this procedure, using cx_Oracle? To be more specific, how to > specify the output parameter? > > Regards, > Dmitriy Arapov > |
From: <Di...@ao...> - 2005-10-24 15:35:53
|
I got Oracle stored procedure, which looks like: PROCEDURE get_list(param1 IN VARCHAR2, param2 IN VARCHAR2, summary_cur OUT REFCUR). IS sql_stmt VARCHAR2(4000); BEGIN sql_stmt = 'SELECT a,b,c,d FROM Tab1, Tab2 WHERE Tab1.x = :param1 AND Tab2.y = :param2;' OPEN summary_cur FOR sql_stmt USING param1, param2; END get_list; Usually it returns more than 1 row. How can call this procedure, using cx_Oracle? To be more specific, how to specify the output parameter? Regards, Dmitriy Arapov |
From: Nik B. <Nik...@pe...> - 2005-10-24 09:38:41
|
Hi, > You - and your customers - can use the Oracle Instant Client. > See > > http://www.oracle.com/technology/tech/oci/instantclient/instan > tclient.html Ah, that looks promising. Thanks! > This is as "lightweight" as you can get, apart from creating your own > cx_Oracle+Oracle libraries distribution. Yep, I'm trying to avoid that as I'm not sure what Oracle's licensing issues would be... Many thanks, Nik |
From: Mark H. <mh...@pi...> - 2005-10-21 17:35:22
|
D.R. Boxhoorn wrote: > Hoi Nik, > > You - and your customers - can use the Oracle Instant Client. > See > > http://www.oracle.com/technology/tech/oci/instantclient/instantclient.html > > the "basic" and "sdk" parts of the OIC are sufficient for installing cx_Oracle. > You just have to change the setup.py a bit > > 50c50 > < includeDirs = ["rdbms/demo", "rdbms/public", "network/public", "sdk/include"] > --- > > includeDirs = ["rdbms/demo", "rdbms/public", "network/public"] > 58c58 > < libDirs = [oracleHome, libPath] > --- > > libDirs = [libPath] > We did a similar patch and it worked well. In order to match our software distribution environment, we repackacked the instantclient installation into the traditional ./{bin,lib/include} hierarchy. Here's our patch: 50c50 < includeDirs = ["rdbms/demo", "rdbms/public", "network/public", "sdk/include"] --- > includeDirs = ["include"] 55c55 < libPath = os.path.join(oracleHome, ".") --- > libPath = os.path.join(oracleHome, "lib") HTH, Mark -- Mark Harrison Pixar Animation Studio |
From: Anthony T. <ant...@gm...> - 2005-10-21 13:57:13
|
I can definitely add something like that to the setup.py that comes with cx_Oracle. If anyone on this list has done the same thing with Windows and Cygwin I'd like to know the changes needed for those platforms. On 10/21/05, D.R. Boxhoorn <da...@as...> wrote: > > Hoi Nik, > > You - and your customers - can use the Oracle Instant Client. > See > > http://www.oracle.com/technology/tech/oci/instantclient/instantclient.= html > > the "basic" and "sdk" parts of the OIC are sufficient for installing cx_O= racle. > You just have to change the setup.py a bit > > 50c50 > < includeDirs =3D ["rdbms/demo", "rdbms/public", "network/public",= "sdk/include"] > --- > > includeDirs =3D ["rdbms/demo", "rdbms/public", "network/public"] > 58c58 > < libDirs =3D [oracleHome, libPath] > --- > > libDirs =3D [libPath] > > > This just appends "sdk/include" to the include searchpath and prepends th= e value > of the ORACLE_HOME environment variable to the library searchpath. > Hmmm, Anthony, maybe something like this should go into the distributed > cx_Oracle setup.py as well. > > This is as "lightweight" as you can get, apart from creating your own > cx_Oracle+Oracle libraries distribution. > > Hoping that this helps, > > Danny > > > > On Fri, Oct 21, 2005 at 10:42:02AM +0100, Nik Barron wrote: > > Hi, > > > > Does cx_Oracle require a full Oracle client installation, or is there a= more > > "lightweight" option? > > > > Currently this hasn't been an issue as our product requires the full cl= ient > > anyway, but the question's been raised by one of our support people as = some > > customers' IT departments don't like rolling out the Oracle client to a= ll > > users. > > > > Regards, > > > > Nick Barron > > > > > > ------------------------------------------------------- > > This SF.Net email is sponsored by: > > Power Architecture Resource Center: Free content, downloads, discussion= s, > > and more. http://solutions.newsforge.com/ibmarch.tmpl > > _______________________________________________ > > cx-oracle-users mailing list > > cx-...@li... > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Power Architecture Resource Center: Free content, downloads, discussions, > and more. http://solutions.newsforge.com/ibmarch.tmpl > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |