cx-oracle-users Mailing List for cx_Oracle (Page 59)
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: Anthony T. <ant...@gm...> - 2009-11-27 18:01:42
|
Hi, It cannot because it is a C extension and the C interface has changed between Python 3.0 and Python 3.1. The code in Subversion works just fine against 3.1.1. I have been intending to release a new version for a while now but there is an outstanding issue with 64-bit machines and "unicode" mode which I have been hoping to resolve. I have had no success on that front so I think I'm just going to release a new version with the changes that I have made and delay no longer. I just have to find the time..... :-) I know I'll have time in two weeks but hopefully I'll find some before then. If you're desperate and can't build from source yourself, send me a private e-mail and I'll send you the raw binary without all the pretty packaging. Anthony On Fri, Nov 27, 2009 at 10:36 AM, Stefan Scriba <sc...@gm...> wrote: > Hi > > I have exactly the same problem as Nikos. Is it possible that cx_Oracle > 5.0.2 (Win MSI for 11g, py3.0) does not work with Python 3.1.1? > > Regards > Stefan > > > ========== > Nikos had written: > ========== > > Hi all, > Has anyone experienced problems with cx_Oracle 5.0.2 (Win MSI for 10g, > py3.0) when installed in Python 3.1.1 ? > I did just that and cx_Oracle is complaining it cannot find the dll, > while replacing python 3.1.1 on the same machine with 3.0 it (cx_Oracle) > works just fine. > Anyone? > Nikos > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Stefan S. <sc...@gm...> - 2009-11-27 17:37:07
|
Hi I have exactly the same problem as Nikos. Is it possible that cx_Oracle 5.0.2 (Win MSI for 11g, py3.0) does not work with Python 3.1.1? Regards Stefan ========== Nikos had written: ========== Hi all, Has anyone experienced problems with cx_Oracle 5.0.2 (Win MSI for 10g, py3.0) when installed in Python 3.1.1 ? I did just that and cx_Oracle is complaining it cannot find the dll, while replacing python 3.1.1 on the same machine with 3.0 it (cx_Oracle) works just fine. Anyone? Nikos |
From: rwe <rog...@to...> - 2009-11-27 09:00:01
|
Sorry to be a pest, but I am still having problems with longs... Important! this problem has started to occur since Oracle 11, specifically: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production No change has been made to the cx_Oracle version... Updating a LONG column gives an oracle error (reads and writes are OK): cx_Oracle.DatabaseError: ORA-01461: can bind a LONG value only for insert into a LONG column The code looks like this: update_sql = """ UPDATE configs SET value=:p_value, last=:p_last, mtime=:p_mtime, muser=USER, remark=:p_remark WHERE id=(SELECT MAX(id) FROM configs WHERE dev_id=:p_dev_id) """ curs.setinputsizes(p_value = cx_Oracle.LONG_STRING) # This line makes no difference.... curs.execute(update_sql, p_value=test_data, p_last=now, p_dev_id=dev_id, p_mtime=now, p_remark="Small test program update") conn.commit() Maybe I have missed soemthing ? I am going to replace all LONG columns in the database with CLOB's before we go into production with 11g, as LONG's are deprecated, but it would be nice to have a fix or workaround for the meantime. regards Roger > > > |
From: rwe <rog...@to...> - 2009-11-27 06:43:55
|
Anthony Tuininga schrieb: > On Thu, Nov 26, 2009 at 1:05 AM, rwe <rog...@to...> wrote: > >> Hi, I have run into a truncated data problem: >> >> File "configuration.py", line 738, in _readConfiguration >> <class 'cx_Oracle.DatabaseError'>: column at array pos 0 fetched >> with error: 1406 >> >> The column is a LONG and the data is large and contains German umlauts.... >> >> I have searched back through the archives, and see that the problem is >> known and there has been some discussion >> about it. >> >> A couple of questions: >> >> Has this problem been fixed in the latest version of cx_Oracle? (I have >> looked at the release notes but could not see a fix.) >> Will changing the column to be a clob or blob fix the problem? >> > > There is nothing to fix. :-) The default size of a long variable is > 128k. If you exceed that you will get the error in question. Use > cursor.setoutputsize to specify a longer size as needed. > > Better yet, use a CLOB or BLOB instead. You can read/write to them in > whatever size chunks you find convenient and you don't have to know in > advance the longest value or allocate memory for array_size * > longest_long_value which can be substantial. > > Anthony > > > Thanks Anthony, I was getting hung up on the language problem, and not looking further... The data causing the problem was the first I had seen using international charachters, but was also the first to break the 128k barrier as well. For the record, is there any international charachter set problem tha I should be aware of? As I said in my original post, there has been some discussion on this but I see no fix. Roger |
From: Anthony T. <ant...@gm...> - 2009-11-26 14:58:49
|
On Thu, Nov 26, 2009 at 1:05 AM, rwe <rog...@to...> wrote: > Hi, I have run into a truncated data problem: > > File "configuration.py", line 738, in _readConfiguration > <class 'cx_Oracle.DatabaseError'>: column at array pos 0 fetched > with error: 1406 > > The column is a LONG and the data is large and contains German umlauts.... > > I have searched back through the archives, and see that the problem is > known and there has been some discussion > about it. > > A couple of questions: > > Has this problem been fixed in the latest version of cx_Oracle? (I have > looked at the release notes but could not see a fix.) > Will changing the column to be a clob or blob fix the problem? There is nothing to fix. :-) The default size of a long variable is 128k. If you exceed that you will get the error in question. Use cursor.setoutputsize to specify a longer size as needed. Better yet, use a CLOB or BLOB instead. You can read/write to them in whatever size chunks you find convenient and you don't have to know in advance the longest value or allocate memory for array_size * longest_long_value which can be substantial. Anthony |
From: rwe <rog...@to...> - 2009-11-26 08:06:34
|
Hi, I have run into a truncated data problem: File "configuration.py", line 738, in _readConfiguration <class 'cx_Oracle.DatabaseError'>: column at array pos 0 fetched with error: 1406 The column is a LONG and the data is large and contains German umlauts.... I have searched back through the archives, and see that the problem is known and there has been some discussion about it. A couple of questions: Has this problem been fixed in the latest version of cx_Oracle? (I have looked at the release notes but could not see a fix.) Will changing the column to be a clob or blob fix the problem? Thanks in advance ... Roger |
From: Anthony T. <ant...@gm...> - 2009-11-20 05:43:40
|
On Wed, Nov 18, 2009 at 9:06 AM, Amaury Forgeot d'Arc <ama...@gm...> wrote: > 2009/11/18 Anthony Tuininga <ant...@gm...>: >> Hi, >> >> This is not a bug but a limitation of the OCI to deal with arrays. >> Specifically, you can't create an array of arrays which is what you >> are trying to do or you cannot use executemany() to call a stored >> procedure that accepts an array. The only solution to this in the OCI >> is to use collections (Oracle objects) but cx_Oracle currently does >> not have support for those at this time. So until that support >> appears, your only option is to call execute() and not executemany(). > > Probably cx_Oracle could help users and raise an exception in this case? > > in Variable_SetValue(), when var->isArray is true, > ensure that arrayPos is zero, else raise a specific exception. I have just checked in code that does precisely this. So the next person who attempts this will get an exception instead of strange behavior. :-) Thanks for the suggestion, Amaury. Anthony |
From: Andreas M. <And...@we...> - 2009-11-18 21:32:40
|
> -----Ursprüngliche Nachricht----- > Von: "Anthony Tuininga" <ant...@gm...> > Gesendet: 18.11.09 18:53:35 > An: cx-...@li... > Betreff: Re: [cx-oracle-users] executemany+array bug? report. Help! > > What? Doesn't everyone know the limitations of Oracle inside out and > backwards??? ;-) Exactly for that "import cx_Oracle" should throw a ReadTheDocumentationException which has to be wrapped explicitly in a try-except-block by the programer stating and confirming that he has read it... ;-) Best regards Andreas |
From: Anthony T. <ant...@gm...> - 2009-11-18 17:36:45
|
On Wed, Nov 18, 2009 at 9:06 AM, Amaury Forgeot d'Arc <ama...@gm...> wrote: > 2009/11/18 Anthony Tuininga <ant...@gm...>: >> Hi, >> >> This is not a bug but a limitation of the OCI to deal with arrays. >> Specifically, you can't create an array of arrays which is what you >> are trying to do or you cannot use executemany() to call a stored >> procedure that accepts an array. The only solution to this in the OCI >> is to use collections (Oracle objects) but cx_Oracle currently does >> not have support for those at this time. So until that support >> appears, your only option is to call execute() and not executemany(). > > Probably cx_Oracle could help users and raise an exception in this case? > > in Variable_SetValue(), when var->isArray is true, > ensure that arrayPos is zero, else raise a specific exception. What? Doesn't everyone know the limitations of Oracle inside out and backwards??? ;-) A good suggestion. Thanks. I'll make sure that gets implemented for the next version. Anthony |
From: Amaury F. d'A. <ama...@gm...> - 2009-11-18 16:06:26
|
2009/11/18 Anthony Tuininga <ant...@gm...>: > Hi, > > This is not a bug but a limitation of the OCI to deal with arrays. > Specifically, you can't create an array of arrays which is what you > are trying to do or you cannot use executemany() to call a stored > procedure that accepts an array. The only solution to this in the OCI > is to use collections (Oracle objects) but cx_Oracle currently does > not have support for those at this time. So until that support > appears, your only option is to call execute() and not executemany(). Probably cx_Oracle could help users and raise an exception in this case? in Variable_SetValue(), when var->isArray is true, ensure that arrayPos is zero, else raise a specific exception. -- Amaury Forgeot d'Arc |
From: Anthony T. <ant...@gm...> - 2009-11-18 14:28:42
|
Hi, This is not a bug but a limitation of the OCI to deal with arrays. Specifically, you can't create an array of arrays which is what you are trying to do or you cannot use executemany() to call a stored procedure that accepts an array. The only solution to this in the OCI is to use collections (Oracle objects) but cx_Oracle currently does not have support for those at this time. So until that support appears, your only option is to call execute() and not executemany(). I hope that explains things sufficiently. If not, let me know. Thanks. Anthony On Wed, Nov 18, 2009 at 1:08 AM, Olof Westman <olo...@gm...> wrote: > Hi, > > I'm trying to send an id and an array to an oracle procedure in batches with > executemany. However it seems the array data gets lost and also mixed up > with previous array data during the batch execute. Here is some minimal code > to > reproduce the problem. > > Oracle Procedure and Type (simply insert the contents of the id and array > into a test table) > > ( TYPE cx_array_type is table of varchar2(3000) index by binary_integer; > ) > > PROCEDURE MyProcedure(id IN NUMBER, in_array IN cx_array_type) IS > BEGIN > IF in_array.FIRST IS NOT NULL THEN > FOR i IN in_array.FIRST .. in_array.LAST LOOP > BEGIN > INSERT INTO testp(id) VALUES (id||in_array(i)); > END; > END LOOP; > END IF; > END; > > Python Code (first running with executemany, single arguments , and the > arrays work fine. Last executemany is with multiple arguments, and this > fails) > > import sys,cx_Oracle > from operator import mod > sys.path.append("../") > import config > > connection = cx_Oracle.connect(config.ORACLE_CONNECT_STRING) > cursor = connection.cursor() > cursor.arraysize = 50 > p_array1 = cursor.arrayvar(cx_Oracle.STRING, ['A1','A2']) > p_array2 = cursor.arrayvar(cx_Oracle.STRING, ['B1','B2']) > p_array3 = cursor.arrayvar(cx_Oracle.STRING, ['C1','C2']) > p_array4 = cursor.arrayvar(cx_Oracle.STRING, ['D1','D2']) > id1="111" > id2="222" > id3="333" > id4="444" > cursor.executemany("begin testpp.myprocedure(:id,:arr); > end;",[{'id':id1,'arr':p_array1}]) > cursor.executemany("begin testpp.myprocedure(:id,:arr); > end;",[{'id':id2,'arr':p_array2}]) > cursor.executemany("begin testpp.myprocedure(:id,:arr); > end;",[{'id':id3,'arr':p_array3},{'id':id4,'arr':p_array4}]) > > connection.commit(); > cursor.close() > connection.close() > > Output of test table: > > SQL> select * from testp; > > ID > -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > 111A1 > 111A2 > 222B1 > 222B2 > 333D1 > 333D2 > > 6 rows selected. > > Conclusion: As you can see p_array3 never makes it to the table, nor does > id4. id3 is mixed together with p_array4, even as they do not go in the same > procedure call. Is this a bug or is there something I did do wrong in the > code? > I'm using cx_oracle 5.0.2, oracle 11.1, and python 2.5.2 > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Olof W. <olo...@gm...> - 2009-11-18 08:09:02
|
Hi, I'm trying to send an id and an array to an oracle procedure in batches with executemany. However it seems the array data gets lost and also mixed up with previous array data during the batch execute. Here is some minimal code to reproduce the problem. Oracle Procedure and Type (simply insert the contents of the id and array into a test table) ( TYPE cx_array_type is table of varchar2(3000) index by binary_integer; ) PROCEDURE MyProcedure(id IN NUMBER, in_array IN cx_array_type) IS BEGIN IF in_array.FIRST IS NOT NULL THEN FOR i IN in_array.FIRST .. in_array.LAST LOOP BEGIN INSERT INTO testp(id) VALUES (id||in_array(i)); END; END LOOP; END IF; END; Python Code (first running with executemany, single arguments , and the arrays work fine. Last executemany is with multiple arguments, and this fails) import sys,cx_Oracle from operator import mod sys.path.append("../") import config connection = cx_Oracle.connect(config.ORACLE_CONNECT_STRING) cursor = connection.cursor() cursor.arraysize = 50 p_array1 = cursor.arrayvar(cx_Oracle.STRING, ['A1','A2']) p_array2 = cursor.arrayvar(cx_Oracle.STRING, ['B1','B2']) p_array3 = cursor.arrayvar(cx_Oracle.STRING, ['C1','C2']) p_array4 = cursor.arrayvar(cx_Oracle.STRING, ['D1','D2']) id1="111" id2="222" id3="333" id4="444" cursor.executemany("begin testpp.myprocedure(:id,:arr); end;",[{'id':id1,'arr':p_array1}]) cursor.executemany("begin testpp.myprocedure(:id,:arr); end;",[{'id':id2,'arr':p_array2}]) cursor.executemany("begin testpp.myprocedure(:id,:arr); end;",[{'id':id3,'arr':p_array3},{'id':id4,'arr':p_array4}]) connection.commit(); cursor.close() connection.close() Output of test table: SQL> select * from testp; ID -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 111A1 111A2 222B1 222B2 333D1 333D2 6 rows selected. Conclusion: As you can see p_array3 never makes it to the table, nor does id4. id3 is mixed together with p_array4, even as they do not go in the same procedure call. Is this a bug or is there something I did do wrong in the code? I'm using cx_oracle 5.0.2, oracle 11.1, and python 2.5.2 |
From: Tzortzakis N. <ntz...@fo...> - 2009-11-17 13:14:29
|
Hi all, Has anyone experienced problems with cx_Oracle 5.0.2 (Win MSI for 10g, py3.0) when installed in Python 3.1.1 ? I did just that and cx_Oracle is complaining it cannot find the dll, while replacing python 3.1.1 on the same machine with 3.0 it (cx_Oracle) works just fine. Anyone? Nikos |
From: Henning v. B. <hen...@ar...> - 2009-11-16 20:17:41
|
> Question: cx_Oracle knows where the following are, right ? > 1) TNS file > 2) Oracle client location. AFAIK the answer is NO. You have to set your environment variables accordingly before starting python. This is OS specific, though. On Windows, the Oracle client DLLs have to be in the PATH and you should at least set the good old "ORACLE_HOME". The location of the TNS file is taken from TNS_ADMIN, if defined, otherwise it's %ORACLE_HOME%\network\admin. With Oracle Instant Client, you don't need ORACLE_HOME, and you should even consider setting ORACLE_HOME, TNS_ADMIN and PATH in such a way that your program will not be influenced by other Oracle software on the same computer... Settings not found in the environment will be read from the Windows registry (HKLM\Software\Oracle). On other OSes like Linux, it is almost the same, but - of course there is no registry database, - you have to struggle with LD_LIBRARY_PATH (32bit, 64 bit) etc... HTH Henning |
From: Andreas M. <And...@we...> - 2009-11-16 14:02:35
|
> -----Ursprüngliche Nachricht----- > Von: "Frank Volkmer" <fra...@ce...> > Gesendet: 16.11.09 14:28:01 > An: <cx-...@li...> > Betreff: Re: [cx-oracle-users] cx_Oracle InterfaceError > Hi there, Hi Frank, > > I've got the same problem with mod_python and cx_Oracle. > I've set ORACLE_HOME, LD_LIBRARY_PATH and DYLD_LIBRARY_PATH (using a > mac here) via SetEnv in httpd.conf. Doesn't change a thing. I don't know the exact solution for your problem, but I want to give you the following hint: When I use mod_perl the environment variables set via SetEnv are NOT available in the interpreter started by apache. I have to explicitly put perl startup code to the initialisation of the perl interpreter to have the right environment variables set. Probably it's the same with mod_python. Best regards Andreas Mock |
From: Michael S. <mic...@ho...> - 2009-11-16 13:48:36
|
You may want to check how you set up your shell variables. A common Linux/Unix mistake is to create a shell, set the variables in the shell and exit the sub shell. HTH > From: fra...@ce... > To: cx-...@li... > Date: Mon, 16 Nov 2009 14:25:19 +0100 > Subject: Re: [cx-oracle-users] cx_Oracle InterfaceError > > Hi there, > > I've got the same problem with mod_python and cx_Oracle. > I've set ORACLE_HOME, LD_LIBRARY_PATH and DYLD_LIBRARY_PATH (using a > mac here) via SetEnv in httpd.conf. Doesn't change a thing. > Setting it in python prior to import cx_Oracle to os.environ, doesn'h > help either. > > In a usual python interpreter cx_Oracle is working fine. Inside > mod_python I get > > Unable to acquire Oracle environment handle > > when trying to access cx_Oracle.SessionPool() > > Any other ideas? > > > Regards > > Frank > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users _________________________________________________________________ Bing brings you maps, menus, and reviews organized in one place. http://www.bing.com/search?q=restaurants&form=MFESRP&publ=WLHMTAG&crea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1 |
From: Frank V. <fra...@ce...> - 2009-11-16 13:26:23
|
Hi there, I've got the same problem with mod_python and cx_Oracle. I've set ORACLE_HOME, LD_LIBRARY_PATH and DYLD_LIBRARY_PATH (using a mac here) via SetEnv in httpd.conf. Doesn't change a thing. Setting it in python prior to import cx_Oracle to os.environ, doesn'h help either. In a usual python interpreter cx_Oracle is working fine. Inside mod_python I get Unable to acquire Oracle environment handle when trying to access cx_Oracle.SessionPool() Any other ideas? Regards Frank |
From: Robert <web...@gm...> - 2009-11-15 19:56:52
|
Anthony, thanks. I downloaed and installed the right package and it works now thanks. Question: cx_Oracle knows where the following are, right ? 1) TNS file 2) Oracle client location. > Date: Fri, 13 Nov 2009 11:24:06 -0700 > From: Anthony Tuininga <ant...@gm...> > Hi, > This means you are using an Oracle 11g compiled version of cx_Oracle > against an Oracle 10g client. You need to make sure that you are using > an Oracle 10g compiled version of cx_Oracle with an Oracle 10g client > or an Oracle 11g compiled version of cx_Oracle with an Oracle 11g > client. You can't mix and match. :-) > > Hope that helps. > > Anthony > |
From: Anthony T. <ant...@gm...> - 2009-11-13 23:53:52
|
Thanks! I listened to the whole thing and found it quite interesting. Nice comments are always appreciated. :-) Anthony On Fri, Nov 13, 2009 at 1:08 AM, Mark Harrison <mh...@pi...> wrote: > From Openworld, Kuassi Mensah and Chris Jones give a nice > shout out... > > Congrats Anthony! > > Podcast feed: > > http://feeds.feedburner.com/OTN_TechCasts > > This podcast: > > http://feedproxy.google.com/~r/OTN_TechCasts/~3/ckUFSdqR7rs/8278398_Chris_Kuassi_110909.mp3 > > If you want to jump right to the nice > comments and skip all the boring factual stuff: > > 7:35 and 8:10 > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Anthony T. <ant...@gm...> - 2009-11-13 18:24:19
|
Hi, This means you are using an Oracle 11g compiled version of cx_Oracle against an Oracle 10g client. You need to make sure that you are using an Oracle 10g compiled version of cx_Oracle with an Oracle 10g client or an Oracle 11g compiled version of cx_Oracle with an Oracle 11g client. You can't mix and match. :-) Hope that helps. Anthony On Fri, Nov 13, 2009 at 9:24 AM, Robert <web...@gm...> wrote: > First try of cx_Oracle is not going well, sigh > > Please help > =============testing on > OS================================================================ > >> ping devdb01 > > Pinging devdb01.corp.zzzzzzzzzzz.com [10.200.10.150] with 32 bytes of data: > Reply from 10.200.10.150: bytes=32 time=1ms TTL=252 > >> sqlplus rob/mrhappy@//devdb01:1521/DEV10 > > Connected to: > Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production > With the Partitioning, OLAP, Data Mining and Real Application Testing options > > =============trying our > cx_Oracle================================================================ > > Python 2.6.3 (r263rc1:75186, Oct 2 2009, 20:40:30) [MSC v.1500 32 bit > (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. >>>> >>>> import cx_Oracle >>>> cx_Oracle.clientversion() > (10, 2, 0, 3, 0) >>>> cx_Oracle.version > '5.0.2' >>>> try: > ... db = cx_Oracle.connect('rob', 'mrhappy', 'devdb01:1521/DEV10') > ... except cx_Oracle.DatabaseError, e: > ... print e[0].context > ... raise > ... > Connection_Connect(): set driver name > Traceback (most recent call last): > File "<stdin>", line 2, in <module> > cx_Oracle.DatabaseError: ORA-24315: illegal attribute type > >>>> quit() > ============================================================================= > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Robert <web...@gm...> - 2009-11-13 16:24:17
|
First try of cx_Oracle is not going well, sigh Please help =============testing on OS================================================================ > ping devdb01 Pinging devdb01.corp.zzzzzzzzzzz.com [10.200.10.150] with 32 bytes of data: Reply from 10.200.10.150: bytes=32 time=1ms TTL=252 > sqlplus rob/mrhappy@//devdb01:1521/DEV10 Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options =============trying our cx_Oracle================================================================ Python 2.6.3 (r263rc1:75186, Oct 2 2009, 20:40:30) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> >>> import cx_Oracle >>> cx_Oracle.clientversion() (10, 2, 0, 3, 0) >>> cx_Oracle.version '5.0.2' >>> try: ... db = cx_Oracle.connect('rob', 'mrhappy', 'devdb01:1521/DEV10') ... except cx_Oracle.DatabaseError, e: ... print e[0].context ... raise ... Connection_Connect(): set driver name Traceback (most recent call last): File "<stdin>", line 2, in <module> cx_Oracle.DatabaseError: ORA-24315: illegal attribute type >>> quit() ============================================================================= |
From: Mark H. <mh...@pi...> - 2009-11-13 08:08:37
|
From Openworld, Kuassi Mensah and Chris Jones give a nice shout out... Congrats Anthony! Podcast feed: http://feeds.feedburner.com/OTN_TechCasts This podcast: http://feedproxy.google.com/~r/OTN_TechCasts/~3/ckUFSdqR7rs/8278398_Chris_Kuassi_110909.mp3 If you want to jump right to the nice comments and skip all the boring factual stuff: 7:35 and 8:10 |
From: Michael S. <mic...@ho...> - 2009-11-12 16:12:52
|
> Date: Thu, 12 Nov 2009 16:50:36 +0100 > From: da...@as... > To: cx-...@li... > Subject: Re: [cx-oracle-users] setting oracle environment variable using python.. > env LD_RUN_PATH='/opt/oracle/oracle/product/10.2.0/client_1/lib' python setup.py build > > This will create a `cx_Oracle.so' that "knows" where the Oracle libraries. > You should be aware that this is considered bad practice by some people, > although it is usually considered as bad as setting LD_LIBRARY_PATH. > > Cheers, > > Danny Huh? The best and most appropriate thing is to set your LD_LIBRARY_PATH in a shell script. You can then call the shell script from your .profile,.login, etc ... The reason you will want to do this is when you're running different versions of python, Oracle, etc ... Then you can call a shell script to set up your environment as you need to. HTH _________________________________________________________________ Bing brings you maps, menus, and reviews organized in one place. http://www.bing.com/search?q=restaurants&form=MFESRP&publ=WLHMTAG&crea=TEXT_MFESRP_Local_MapsMenu_Resturants_1x1 |
From: D.R. B. <da...@as...> - 2009-11-12 15:50:53
|
Hoi Devyan, If you do not have write access to `/etc/ld.so.conf.d' you might consider building cx_Oracle with the absolute path to the libraries. In your case it should be as simple as env LD_RUN_PATH='/opt/oracle/oracle/product/10.2.0/client_1/lib' python setup.py build This will create a `cx_Oracle.so' that "knows" where the Oracle libraries. You should be aware that this is considered bad practice by some people, although it is usually considered as bad as setting LD_LIBRARY_PATH. Cheers, Danny On Thu, Nov 12, 2009 at 04:39:09PM +0530, devyan parmar wrote: > hello everyone, > > i am trying to set cx_oracle environment variable using python script. which > sets properly but cx_oracle is not referring it and getting import error. > > following is my code. > > import os > os.environ['ORACLE_HOME'] = '/opt/oracle/oracle/product/10.2.0/client_1' > os.environ['TNS_ADMIN'] = > '/install/ji_trunk/dataExchange/HPHC/release_interface' > os.environ['LD_LIBRARY_PATH'] = > '/opt/oracle/oracle/product/10.2.0/client_1/lib' > os.environ['NLS_LANG'] = 'AMERICAN_AMERICA.WE8ISO8859P1' > os.environ['NLS_DATE_FORMAT'] = 'MM/DD/YYYY HH24:MI:SS' > os.environ['PATH'] = > os.environ['PATH']+':/opt/oracle/oracle/product/10.2.0/client_1/bin' > print os.environ > import cx_Oracle > > > in above code after setting environment variable i have kept print > "os.environ" statement which gives me result that variable got set. > but after that if i try to import cx_Oracle.. gives me following error.. > > File "test.py", line 10, in <module> > import cx_Oracle > ImportError: libclntsh.so.10.1: cannot open shared object file: No such file > or directory > > > cx_Oracle import works when the same environment variable if i run through > shell script. > but in my code i wants environment to be set through python script. > > please help me to resolve this issue. > > Thanks Regards > Devyan Parmar > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Anthony T. <ant...@gm...> - 2009-11-12 14:25:57
|
On Thu, Nov 12, 2009 at 6:02 AM, Jim St.Cyr <jim...@gm...> wrote: > devyan parmar wrote: >> hello everyone, >> >> i am trying to set cx_oracle environment variable using python script. >> which sets properly but cx_oracle is not referring it and getting >> import error. >> >> following is my code. >> >> import os >> os.environ['ORACLE_HOME'] = '/opt/oracle/oracle/product/10.2.0/client_1' >> os.environ['TNS_ADMIN'] = >> '/install/ji_trunk/dataExchange/HPHC/release_interface' >> os.environ['LD_LIBRARY_PATH'] = >> '/opt/oracle/oracle/product/10.2.0/client_1/lib' >> os.environ['NLS_LANG'] = 'AMERICAN_AMERICA.WE8ISO8859P1' >> os.environ['NLS_DATE_FORMAT'] = 'MM/DD/YYYY HH24:MI:SS' >> os.environ['PATH'] = >> os.environ['PATH']+':/opt/oracle/oracle/product/10.2.0/client_1/bin' >> print os.environ >> import cx_Oracle >> >> >> in above code after setting environment variable i have kept print >> "os.environ" statement which gives me result that variable got set. >> but after that if i try to import cx_Oracle.. gives me following error.. >> >> File "test.py", line 10, in <module> >> import cx_Oracle >> ImportError: libclntsh.so.10.1: cannot open shared object file: No >> such file or directory >> >> >> cx_Oracle import works when the same environment variable if i run >> through shell script. >> but in my code i wants environment to be set through python script. >> >> please help me to resolve this issue. >> >> Thanks Regards >> Devyan Parmar >> >> > > Devyan- > > I had the same problem as you and solved it in the way you mentioned; > set the variables in a shell script prior to running the python script. > Hopefully a more knowledgeable user will jump in with the solution. > > Jim The environment variable LD_LIBRARY_PATH can not be set within a running application. It is only examined upon startup of an application. So the solution of setting it outside in a shell script or in /etc/ld.so.conf.d is the one you want to use. The other environment variables you can set within Python if you wish. Anthony |