cx-oracle-users Mailing List for cx_Oracle (Page 43)
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: xiaohaiany <xia...@gm...> - 2011-03-26 02:38:37
|
2011-03-26 xiaohaiany |
From: <jc....@gm...> - 2011-03-23 09:35:50
|
Thanks, Anthony, for your response on this. Over the last couple of years, I've been using cx_Oracle to define my own classes on Oracle objects for various projects that I'm working on. Code re-usability is one of the benefits of this. Hard work, but it pays off in the long run. I'll be looking out for announcements of object support being built into cx_Oracle! Again, many thanks Jon On , Anthony Tuininga <ant...@gm...> wrote: > You're welcome. I can elaborate a little. Essentially, what I mean > here is the ability to create an object from scratch or retrieve one > from the database and then modify its attributes and save them back > into the database. Its needed for a number of situations, the most > notable one being the spatial interface provided by Oracle. There are > ways around it (anonymous PL/SQL blocks and the like) but a direct > interface would be appreciated by quite a few judging from the e-mails > that I have received over the past years! I hope that explains things. > Anthony |
From: Anthony T. <ant...@gm...> - 2011-03-22 16:06:04
|
You're welcome. I can elaborate a little. Essentially, what I mean here is the ability to create an object from scratch or retrieve one from the database and then modify its attributes and save them back into the database. Its needed for a number of situations, the most notable one being the spatial interface provided by Oracle. There are ways around it (anonymous PL/SQL blocks and the like) but a direct interface would be appreciated by quite a few judging from the e-mails that I have received over the past years! I hope that explains things. Anthony On Tue, Mar 22, 2011 at 3:22 AM, <jc....@gm...> wrote: > Thanks, Anthony. > > You refer to adding full object support. Can you elaborate on what you have > in mind, here? > > TIA, > Jon > > >> >> 2) Added support for creating an empty object variable via a named >> >> type, the first step to adding full object support. >> > ------------------------------------------------------------------------------ > Enable your software for Intel(R) Active Management Technology to meet the > growing manageability and security demands of your customers. Businesses > are taking advantage of Intel(R) vPro (TM) technology - will your software > be a part of the solution? Download the Intel(R) Manageability Checker > today! http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: <jc....@gm...> - 2011-03-22 09:23:03
|
Thanks, Anthony. You refer to adding full object support. Can you elaborate on what you have in mind, here? TIA, Jon > 2) Added support for creating an empty object variable via a named > type, the first step to adding full object support. |
From: Anthony T. <ant...@gm...> - 2011-03-21 13:38:33
|
What is cx_Oracle? cx_Oracle is a Python extension module that allows access to Oracle and conforms to the Python database API 2.0 specifications with a few exceptions. Where do I get it? http://cx-oracle.sourceforge.net What's new? 1) Remove support for UNICODE mode and permit Unicode to be passed through everywhere a string may be passed in. This means that strings will be passed through to Oracle using the value of the NLS_LANG environment variable in Python 3.x as well. Doing this eliminated a bunch of problems that were discovered by using UNICODE mode and also removed an unnecessary restriction in Python 2.x that Unicode could not be used in connect strings or SQL statements, for example. 2) Added support for creating an empty object variable via a named type, the first step to adding full object support. 3) Added support for Python 3.2. 4) Account for lib64 used on x86_64 systems. Thanks to Alex Wood for supplying the patch. 5) Clear up potential problems when calling cursor.close() ahead of the cursor being freed by going out of scope. 6) Avoid compilation difficulties on AIX5 as OCIPing does not appear to be available on that platform under Oracle 10g Release 2. Thanks to Pierre-Yves Fontaniere for the patch. 7) Free temporary LOBs prior to each fetch in order to avoid leaking them. Thanks to Uwe Hoffmann for the initial patch. |
From: Massa, H. A. <ch...@gh...> - 2011-03-04 10:32:28
|
Amaury, > Isn't the namedtuple solution enough? > it allows both attribute access and number-based index. aaah, thanks for taking the time to remind me again! I was so focussed on the PostgreSQL PL/Python documentation which talks about "must be attributes to an object" that I missed the "if it behaves like an object, it will be fine" ... it works perfectly with named tuple (which also should give a memory benefit) so for the casual googler: pl/python setof <type> returning functions can use named tuples for the data rows in PostgreSQL Thanks again, Harald > > Your use case is even mentioned in the namedtuple documentation: > http://docs.python.org/dev/library/collections.html#collections.namedtuple > (look for the "sqlite" example) > > -- > Amaury Forgeot d'Arc > -- GHUM GmbH Harald Armin Massa Spielberger Straße 49 70435 Stuttgart 0173/9409607 Amtsgericht Stuttgart, HRB 734971 - persuadere. et programmare |
From: Amaury F. d'A. <ama...@gm...> - 2011-03-03 13:50:16
|
2011/3/3 Massa, Harald Armin <ch...@gh...>: > So I am still missing out a more elegant way to have those columns > transformed to attributes of an object... Isn't the namedtuple solution enough? it allows both attribute access and number-based index. Your use case is even mentioned in the namedtuple documentation: http://docs.python.org/dev/library/collections.html#collections.namedtuple (look for the "sqlite" example) -- Amaury Forgeot d'Arc |
From: Massa, H. A. <ch...@gh...> - 2011-03-03 13:36:34
|
Amaury, >> To be able to return an cx_Oracle result set as a "set of records" >> from a function (which is similiar to the "table returning functions" >> within Oracle), the columns of the record need to be attributes of an >> object. Actually I do: > > I'd do it with a "row factory", here are two examples, one which > builds a dictionary, the other one builds a "named tuple" and is > very similar to sqlite3.Row. Thank you very much for those row-factory examples! With those I will be able to reduce the "data-moving-around-in-memory" part of my usage. So I am still missing out a more elegant way to have those columns transformed to attributes of an object... Thanks so far, Harald -- GHUM GmbH Harald Armin Massa Spielberger Straße 49 70435 Stuttgart 0173/9409607 Amtsgericht Stuttgart, HRB 734971 - persuadere. et programmare |
From: Amaury F. d'A. <ama...@gm...> - 2011-03-03 12:21:55
|
Hi, 2011/3/3 Massa, Harald Armin <ch...@gh...>: > To be able to return an cx_Oracle result set as a "set of records" > from a function (which is similiar to the "table returning functions" > within Oracle), the columns of the record need to be attributes of an > object. Actually I do: I'd do it with a "row factory", here are two examples, one which builds a dictionary, the other one builds a "named tuple" and is very similar to sqlite3.Row. def makeDictFactory(cursor): columnNames = [d[0] for d in cursor.description] def createRow(*args): return dict(zip(columnNames, args)) return createRow def makeNamedTupleFactory(cursor): columnNames = [d[0].lower() for d in cursor.description] import collections Row = collections.namedtuple('Row', columnNames) return Row Then, just after the cs.execute() call, you can add: cs.rowfactory = makeDictFactory(cs) or cs.rowfactory = makeNamedTupleFactory(cs) -- Amaury Forgeot d'Arc |
From: Massa, H. A. <ch...@gh...> - 2011-03-03 11:25:36
|
Hello, I am using cx_Oracle to provide Oracle-Acces for a PostgreSQL database via pl/python. To be able to return an cx_Oracle result set as a "set of records" from a function (which is similiar to the "table returning functions" within Oracle), the columns of the record need to be attributes of an object. Actually I do: ------------------- import cx_Oracle cn=cx_Oracle.connect("user","password","tnsname") cs=cn.cursor() cs.execute("""select id, firstname, secondname, street, zipcode from adresses""") daten=cs.fetchall() cn.commit() class xrow(object): pass ergebnis=[] fieldnames = [a[0].lower() for a in cs.description] for row in daten: myrow=xrow() for index, fn in enumerate(fieldnames): setattr(myrow,fn,row[index]) ergebnis.append(myrow) return ergebnis which gives me a nice table as a result of that function call, which can be perfectly used. Now... that "loop through the result and attach every column to a stub object" does not feel very elegant; and it needs python to loop through every field. Is there a more elegant / faster / more compact solution? Best wishes, Harald -- GHUM GmbH Harald Armin Massa Spielberger Straße 49 70435 Stuttgart 0173/9409607 Amtsgericht Stuttgart, HRB 734971 - persuadere. et programmare |
From: Himanshu <him...@gm...> - 2011-03-03 11:10:00
|
On 3 March 2011 06:49, Doug Henderson <djh...@te...> wrote: > On 2011-03-01 02:59, Amaury Forgeot d'Arc wrote: > > Hi, > > > > 2011/3/1 Himanshu <him...@gm...>: > >> WHERE log_date >= '10-Feb-11' > >> AND log_date <= '10-Feb-11' > > You should avoid date literals in SQL statements. The exact format may > > depend on environment > > variables (language...) and other Oracle client settings. > > Use something like to_date('10-02-2011', 'DD-MM-YYYY') > > Also, this WHERE clause only selects lines where "log_date" has no > > time (or midnight). > > Is it really the case in your data? > > > SQL Developer silently issues ALTER SESSION commands based on the > settings in the Tools-Preferences dialog, NLS panel. It can also import > login scripts, which might contain alter session commands. All this in > addition to the impact of environment variables, and even windows > registry settings. > > Your date literals may not be interpreted in the way you expect. > > Try using the DATE'yyyy-mm-dd' format, or provide an explicit conversion > for your date literals. > Thanks a lot for the reply. The problem was just this behavior of sql developer. It had some permissions which my python code didn't have for the same user. It worked on doing a grant select on one of the tables. Further investigation needed but I am done for now. Thanks, Himanshu |
From: Doug H. <djh...@te...> - 2011-03-03 01:34:57
|
On 2011-03-01 02:59, Amaury Forgeot d'Arc wrote: > Hi, > > 2011/3/1 Himanshu <him...@gm...>: >> WHERE log_date >= '10-Feb-11' >> AND log_date <= '10-Feb-11' > You should avoid date literals in SQL statements. The exact format may > depend on environment > variables (language...) and other Oracle client settings. > Use something like to_date('10-02-2011', 'DD-MM-YYYY') > Also, this WHERE clause only selects lines where "log_date" has no > time (or midnight). > Is it really the case in your data? > SQL Developer silently issues ALTER SESSION commands based on the settings in the Tools-Preferences dialog, NLS panel. It can also import login scripts, which might contain alter session commands. All this in addition to the impact of environment variables, and even windows registry settings. Your date literals may not be interpreted in the way you expect. Try using the DATE'yyyy-mm-dd' format, or provide an explicit conversion for your date literals. -- Doug Henderson, Calgary, Alberta, Canada |
From: Himanshu <him...@gm...> - 2011-03-01 10:30:37
|
On 1 March 2011 15:29, Amaury Forgeot d'Arc <ama...@gm...> wrote: > Hi, > > 2011/3/1 Himanshu <him...@gm...>: > > WHERE log_date >= '10-Feb-11' > > AND log_date <= '10-Feb-11' > > You should avoid date literals in SQL statements. The exact format may > depend on environment > variables (language...) and other Oracle client settings. > Use something like to_date('10-02-2011', 'DD-MM-YYYY') > Also, this WHERE clause only selects lines where "log_date" has no > time (or midnight). > Is it really the case in your data? > Thanks for the reply. The actual code has a variable that populates with the date time value oracle needs. This was the smallest test case I could create for my post. Sorry for the confusion though. What puzzles me is that the following code returns rows from python :- -- begin working code with one join less -- import cx_Oracle connection_string = {snipped} connection = cx_Oracle.connect(**connection_string) cursor = connection.cursor() cursor.execute(''' SELECT g.city, status, sum(count) FROM a_counts m JOIN geo g ON m.geo_id = g.id JOIN cities c ON c.accent_city = g.city WHERE log_date >= to_date('10-02-2011', 'DD-MM-YYYY') AND log_date <= to_date('10-02-2011', 'DD-MM-YYYY') AND g.country = 'IND' GROUP BY g.city, status ''') print cursor.fetchall() -- end working code with one join less -- and the following works from sql developer -- begin identical working query -- SELECT s.hasc, status, sum(count) FROM a_counts m JOIN geo g ON m.geo_id = g.id JOIN cities c ON c.accent_city = g.city JOIN statoids s ON s.capital = g.city WHERE log_date >= '10-Feb-11' AND log_date <= '10-Feb-11' AND g.country = 'IND' GROUP BY s.hasc, status; -- end identical working query -- but the following doesn't :- -- begin not working code -- import cx_Oracle connection_string = {snipped} connection = cx_Oracle.connect(**connection_string) cursor = connection.cursor() cursor.execute(''' SELECT s.hasc, status, sum(count) FROM a_counts m JOIN geo g ON m.geo_id = g.id JOIN cities c ON c.accent_city = g.city JOIN statoids s ON s.capital = g.city WHERE log_date >= to_date('10-02-2011', 'DD-MM-YYYY') AND log_date <= to_date('10-02-2011', 'DD-MM-YYYY') AND g.country = 'IND' GROUP BY s.hasc, status ''') print cursor.fetchall() -- end not working code -- |
From: Amaury F. d'A. <ama...@gm...> - 2011-03-01 09:59:15
|
Hi, 2011/3/1 Himanshu <him...@gm...>: > WHERE log_date >= '10-Feb-11' > AND log_date <= '10-Feb-11' You should avoid date literals in SQL statements. The exact format may depend on environment variables (language...) and other Oracle client settings. Use something like to_date('10-02-2011', 'DD-MM-YYYY') Also, this WHERE clause only selects lines where "log_date" has no time (or midnight). Is it really the case in your data? -- Amaury Forgeot d'Arc |
From: Himanshu <him...@gm...> - 2011-03-01 09:42:25
|
Hi, The following code doesn't return any rows but the same query returns 300+ rows when run from sql developer. What could I be missing? How to debug this? import cx_Oracle # snipped setting up connection_string connection = cx_Oracle.connect(**connection_string) cursor = connection.cursor() cursor.execute(''' SELECT s.hasc, status, sum(count) FROM a_counts m JOIN geo g ON m.geo_id = g.id JOIN cities c ON c.accent_city = g.city JOIN statoids s ON s.capital = g.city WHERE log_date >= '10-Feb-11' AND log_date <= '10-Feb-11' AND g.country = 'IND' GROUP BY s.hasc, status ''') print cursor.fetchall() Thank You, Himanshu |
From: Mark H. <mh...@pi...> - 2011-02-25 18:51:52
|
On 2/25/11 1:26 AM, Marco De Paoli wrote: > I built my own python executable but it doesn't show anything interesting > > So I rebuilt a complete environment from scratch using virtualenv and referring the python executable I built. Then I setup cx_Oracle, django and so on > > The result is that everything works fine I was unable to reproduce the crash any more > > I don't know exactly where the problem was, but maybe it was a problem with miss-alignment among shared libraries > > thank you very much for your advices > I really apprecciated them :-) You're welcome, glad everything is working! Nobody told me in school that so much of "computer science" would be "debugging shared library problems"! :-) |
From: Marco De P. <dep...@gm...> - 2011-02-25 09:27:05
|
I built my own python executable but it doesn't show anything interesting So I rebuilt a complete environment from scratch using virtualenv and referring the python executable I built. Then I setup cx_Oracle, django and so on The result is that everything works fine I was unable to reproduce the crash any more I don't know exactly where the problem was, but maybe it was a problem with miss-alignment among shared libraries thank you very much for your advices I really apprecciated them :-) Marco On Tue, Feb 22, 2011 at 9:08 AM, Marco De Paoli <dep...@gm...> wrote: > thanks for your advices > > Yes, it is a single thread program > > Yes, I'm running the program multiple times over and over again and noting > errors one time and not the next, each run open/close the connection > multiple times > > Ok, I'll try to build my python executable (maybe I could try to check > specifically libc static/dynamic...) > > > I'll let you know, > Marco > > On Mon, Feb 21, 2011 at 11:49 PM, Mark Harrison <mh...@pi...> wrote: > >> On 2/21/11 10:21 AM, Anthony Tuininga wrote: >> > That does indeed sound rather strange. OCIEnvNlsCreate() is an Oracle >> > function so there is no way to debug this short of calling up Oracle >> > and asking them for support. Is this a single threaded program? If it >> > is multi-threaded you will need to set threaded mode to avoid strange >> > problems -- perhaps ones like these. Are you opening/closing the >> > connection multiple times in your program or just running a program >> > over and over again and noting errors one time and not the next? I've >> > never run into these problems myself so not sure how to help you >> > further besides giving suggestions for debugging on your own! >> >> Possibly there's something conflicting in your system python build? >> >> Perhaps try building your own python executable may show something >> interesting. >> >> >> >> ------------------------------------------------------------------------------ >> Index, Search & Analyze Logs and other IT data in Real-Time with Splunk >> Collect, index and harness all the fast moving IT data generated by your >> applications, servers and devices whether physical, virtual or in the >> cloud. >> Deliver compliance at lower cost and gain new business insights. >> Free Software Download: http://p.sf.net/sfu/splunk-dev2dev >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > > |
From: Zane A. <zan...@ya...> - 2011-02-22 15:30:38
|
Hi Please advise if cx_Oracle has ever been built with the following: Python 2.7(or 2.6) Oracle11.2 (64bit) AIX6.1(64bit) gcc-4.2 IBM Power7 Server (Power7 Mode) I've really been battling to get this build and installed. This is my error: ************** python setup.py build running build running build_ext building 'cx_Oracle' extension /opt/freeware/lib/python2.6/config/ld_so_aix xlC_r -bI:/opt/freeware/lib/python2.6/config/python.exp build/temp.aix-6.1-2.6-10g/cx_Oracle.o -L/app/oracle/product/11.2.0/dbhome_1/lib -L/app/oracle/product/11.2.0/dbhome_1 -lclntsh -o build/lib.aix-6.1-2.6-10g/cx_Oracle.so ld: 0711-317 ERROR: Undefined symbol: .OCIErrorGet ld: 0711-317 ERROR: Undefined symbol: .OCIAttrSet ld: 0711-317 ERROR: Undefined symbol: .OCIHandleAlloc ld: 0711-317 ERROR: Undefined symbol: .OCIHandleFree ld: 0711-317 ERROR: Undefined symbol: .OCIStmtRelease ld: 0711-317 ERROR: Undefined symbol: .OCIIntervalGetDaySecond ld: 0711-317 ERROR: Undefined symbol: .OCIIntervalSetDaySecond ld: 0711-317 ERROR: Undefined symbol: .OCIDescriptorFree ld: 0711-317 ERROR: Undefined symbol: .OCIDescriptorAlloc ld: 0711-317 ERROR: Undefined symbol: .OCINumberToReal ld: 0711-317 ERROR: Undefined symbol: .OCINumberToInt ld: 0711-317 ERROR: Undefined symbol: .OCINumberToText ld: 0711-317 ERROR: Undefined symbol: .OCINumberFromInt ld: 0711-317 ERROR: Undefined symbol: .OCINumberFromText ld: 0711-317 ERROR: Undefined symbol: .OCINumberFromReal ld: 0711-317 ERROR: Undefined symbol: .OCIAttrGet ld: 0711-317 ERROR: Undefined symbol: .OCIBindByName ld: 0711-317 ERROR: Undefined symbol: .OCIBindByPos ld: 0711-317 ERROR: Undefined symbol: .OCIParamGet ld: 0711-317 ERROR: Undefined symbol: .OCIDefineByPos ld: 0711-317 ERROR: Undefined symbol: .OCIDateTimeGetDate ld: 0711-317 ERROR: Undefined symbol: .OCIDateTimeGetTime ld: 0711-317 ERROR: Undefined symbol: .OCIStringPtr ld: 0711-317 ERROR: Undefined symbol: .OCIStringSize ld: 0711-317 ERROR: Undefined symbol: .OCIIterCreate ld: 0711-317 ERROR: Undefined symbol: .OCIIterNext ld: 0711-317 ERROR: Undefined symbol: .OCIIterDelete ld: 0711-317 ERROR: Undefined symbol: .OCIDefineObject ld: 0711-317 ERROR: Undefined symbol: .OCIObjectPin ld: 0711-317 ERROR: Undefined symbol: .OCIDescribeAny ld: 0711-317 ERROR: Undefined symbol: .OCIObjectFree ld: 0711-317 ERROR: Undefined symbol: .OCILobTrim ld: 0711-317 ERROR: Undefined symbol: .OCILobWrite ld: 0711-317 ERROR: Undefined symbol: .OCILobIsTemporary ld: 0711-317 ERROR: Undefined symbol: .OCILobCreateTemporary ld: 0711-317 ERROR: Undefined symbol: .OCILobFreeTemporary ld: 0711-317 ERROR: Undefined symbol: .OCIDateTimeConstruct ld: 0711-317 ERROR: Undefined symbol: .OCIDateTimeCheck ld: 0711-317 ERROR: Undefined symbol: .OCIStmtExecute ld: 0711-317 ERROR: Undefined symbol: .OCILobFileExists ld: 0711-317 ERROR: Undefined symbol: .OCILobFileSetName ld: 0711-317 ERROR: Undefined symbol: .OCILobFileGetName ld: 0711-317 ERROR: Undefined symbol: .OCILobIsOpen ld: 0711-317 ERROR: Undefined symbol: .OCILobGetChunkSize ld: 0711-317 ERROR: Undefined symbol: .OCILobGetLength ld: 0711-317 ERROR: Undefined symbol: .OCILobFileOpen ld: 0711-317 ERROR: Undefined symbol: .OCILobRead ld: 0711-317 ERROR: Undefined symbol: .OCILobFileClose ld: 0711-317 ERROR: Undefined symbol: .OCILobClose ld: 0711-317 ERROR: Undefined symbol: .OCILobOpen ld: 0711-317 ERROR: Undefined symbol: .OCITransRollback ld: 0711-317 ERROR: Undefined symbol: .OCISessionRelease ld: 0711-317 ERROR: Undefined symbol: .OCIStmtPrepare ld: 0711-317 ERROR: Undefined symbol: .OCIStmtGetBindInfo ld: 0711-317 ERROR: Undefined symbol: .OCIStmtPrepare2 ld: 0711-317 ERROR: Undefined symbol: .OCIStmtFetch ld: 0711-317 ERROR: Undefined symbol: .OCINlsCharSetIdToName ld: 0711-317 ERROR: Undefined symbol: .OCINlsNameMap ld: 0711-317 ERROR: Undefined symbol: .OCIPasswordChange ld: 0711-317 ERROR: Undefined symbol: .OCISubscriptionRegister ld: 0711-317 ERROR: Undefined symbol: .OCIEnvNlsCreate ld: 0711-317 ERROR: Undefined symbol: .OCINlsNumericInfoGet ld: 0711-317 ERROR: Undefined symbol: .OCICollSize ld: 0711-317 ERROR: Undefined symbol: .OCICollGetElem ld: 0711-317 ERROR: Undefined symbol: .OCIDBStartup ld: 0711-317 ERROR: Undefined symbol: .OCIDBShutdown ld: 0711-317 ERROR: Undefined symbol: .OCIPing ld: 0711-317 ERROR: Undefined symbol: .OCIUserCallbackGet ld: 0711-317 ERROR: Undefined symbol: .OCIUserCallbackRegister ld: 0711-317 ERROR: Undefined symbol: .OCIBreak ld: 0711-317 ERROR: Undefined symbol: .OCISessionEnd ld: 0711-317 ERROR: Undefined symbol: .OCITransPrepare ld: 0711-317 ERROR: Undefined symbol: .OCITransStart ld: 0711-317 ERROR: Undefined symbol: .OCITransCommit ld: 0711-317 ERROR: Undefined symbol: .OCIClientVersion ld: 0711-317 ERROR: Undefined symbol: .OCISubscriptionUnRegister ld: 0711-317 ERROR: Undefined symbol: .OCIObjectGetAttr ld: 0711-317 ERROR: Undefined symbol: .OCIObjectUnpin ld: 0711-317 ERROR: Undefined symbol: .OCISessionPoolCreate ld: 0711-317 ERROR: Undefined symbol: .OCISessionPoolDestroy ld: 0711-317 ERROR: Undefined symbol: .OCISessionGet ld: 0711-317 ERROR: Undefined symbol: .OCIServerAttach ld: 0711-317 ERROR: Undefined symbol: .OCISessionBegin ld: 0711-317 ERROR: Undefined symbol: .OCIServerDetach ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. [server01:root:/software/Python/cx_Oracle-5.0.4:] ******************** Please assist. Thanks Zane ________________________________ From: inkblotter <ink...@gm...> To: Zane Ally <zan...@ya...> Cc: cx-...@li... Sent: Sat, December 25, 2010 7:58:47 PM Subject: Re: [cx-oracle-users] cx_oracle module AIX6.1 Oracle Here's a christmas present for you. See the build line that setup.py provides. setup.py invokes the C compiler, not the C++ compiler. So copy and invoke that build line but replace cc_r with xlC_r by hand and presto! you will have built cx_Oracle.o Then you can run 'python setup.py install' and it will install cx_Oracle.so in python. Try it. I just did this on AIX 6.1. On 12/23/2010 01:25 AM, Zane Ally wrote: cc_r -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/app/oracle/product/11.2.0/dbhome_1/rdbms/demo -I/app/oracle/product/11.2.0/dbhome_1/rdbms/public -I/usr/local/include/python2.7 -c cx_Oracle.c -o build/temp.aix-6.1-2.7-10g/cx_Oracle.o -DBUILD_VERSION=5.0.4 |
From: Marco De P. <dep...@gm...> - 2011-02-22 08:09:07
|
thanks for your advices Yes, it is a single thread program Yes, I'm running the program multiple times over and over again and noting errors one time and not the next, each run open/close the connection multiple times Ok, I'll try to build my python executable (maybe I could try to check specifically libc static/dynamic...) I'll let you know, Marco On Mon, Feb 21, 2011 at 11:49 PM, Mark Harrison <mh...@pi...> wrote: > On 2/21/11 10:21 AM, Anthony Tuininga wrote: > > That does indeed sound rather strange. OCIEnvNlsCreate() is an Oracle > > function so there is no way to debug this short of calling up Oracle > > and asking them for support. Is this a single threaded program? If it > > is multi-threaded you will need to set threaded mode to avoid strange > > problems -- perhaps ones like these. Are you opening/closing the > > connection multiple times in your program or just running a program > > over and over again and noting errors one time and not the next? I've > > never run into these problems myself so not sure how to help you > > further besides giving suggestions for debugging on your own! > > Possibly there's something conflicting in your system python build? > > Perhaps try building your own python executable may show something > interesting. > > > > ------------------------------------------------------------------------------ > Index, Search & Analyze Logs and other IT data in Real-Time with Splunk > Collect, index and harness all the fast moving IT data generated by your > applications, servers and devices whether physical, virtual or in the > cloud. > Deliver compliance at lower cost and gain new business insights. > Free Software Download: http://p.sf.net/sfu/splunk-dev2dev > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Mark H. <mh...@pi...> - 2011-02-21 22:49:46
|
On 2/21/11 10:21 AM, Anthony Tuininga wrote: > That does indeed sound rather strange. OCIEnvNlsCreate() is an Oracle > function so there is no way to debug this short of calling up Oracle > and asking them for support. Is this a single threaded program? If it > is multi-threaded you will need to set threaded mode to avoid strange > problems -- perhaps ones like these. Are you opening/closing the > connection multiple times in your program or just running a program > over and over again and noting errors one time and not the next? I've > never run into these problems myself so not sure how to help you > further besides giving suggestions for debugging on your own! Possibly there's something conflicting in your system python build? Perhaps try building your own python executable may show something interesting. |
From: Anthony T. <ant...@gm...> - 2011-02-21 18:21:21
|
That does indeed sound rather strange. OCIEnvNlsCreate() is an Oracle function so there is no way to debug this short of calling up Oracle and asking them for support. Is this a single threaded program? If it is multi-threaded you will need to set threaded mode to avoid strange problems -- perhaps ones like these. Are you opening/closing the connection multiple times in your program or just running a program over and over again and noting errors one time and not the next? I've never run into these problems myself so not sure how to help you further besides giving suggestions for debugging on your own! Anthony On Mon, Feb 21, 2011 at 6:52 AM, Marco De Paoli <dep...@gm...> wrote: > I am sorry to be so stressfull > but things are becoming really really strange > > On the base of the last mails, I was thinking it was an environment > variables problem, so I started to print all the environment just before > cx_Oracle.connect. The values were always good but the connection sometimes > worked and sometimes not (as I already said) > > So i decided to modify Environment.c to inject an explicit setenv statement > just before OCIEnvNlsCreate call. The result was the same: the connection > sometimes worked and sometimes not. > > At a certain point I inserted an explicit printf statement in file > Connection.c. The printf statement is located just before the > Environment_NewFromScratch call > > The result is that everything works > > ... the problem is that OCIEnvNlsCreate is completelly black-box for me, I > can't debug it in any way: is there any other check I can do? > > thanks for your patience, > Marco > > On Thu, Feb 17, 2011 at 5:49 PM, Marco De Paoli <dep...@gm...> wrote: >>> >>> On Wed, Feb 16, 2011 at 7:57 PM, Mark Harrison <mh...@pi...> wrote: >>>> >>>> On 2/16/11 8:54 AM, Marco De Paoli wrote: >>>> > everything works if I force the rebuild of a file named tests.pyc in a >>>> > django folder >>>> > (via rm tests.pyc or via touch tests.pyc) >>>> > >>>> > if the file is already there I obtain "Unable to acquire Oracle >>>> > environment handle" >>>> > >>>> > Maybe it's an issue on the django side, but I can't undestand what >>>> > could be wrong... >>>> > >>>> > django is a pure python package and the question is: how can django >>>> > influence the OCIEnvNlsCreate call in Environment.c that, as far as I know, >>>> > doesn't get any login but just initialize a client data structure?!? >>>> >>>> >>>> that one is weird. maybe you can do something like this: >>>> >>>> edit one or more of the django files, and put in >>>> >>>> conn=cx_Oracle.connect(...) >>>> >>>> calls. >>>> >>>> hopefully, the one at the very top of the first django file will be >>>> successful. >>>> eventually you will hit one that fails. then you can move the connect >>>> lines >>>> around to narrow down where the bad thing is happening. >> >> I injected conn=cx_Oracle.connect(...) all around django sources >> >> sometimes it works, other times it doesn't: I save a django file and >> everything works fine, I try to lunch again and it doesn't work anymore >> then I remove a pyc file and it works again, I lunch again and it works, >> the third time it doesn't work anymore >> >> I'm sorry I cant' give you more precise infos... but I feel like I'm >> chasing ghosts :( >> >> Marco > > > ------------------------------------------------------------------------------ > The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Marco De P. <dep...@gm...> - 2011-02-21 13:52:52
|
I am sorry to be so stressfull but things are becoming really really strange On the base of the last mails, I was thinking it was an environment variables problem, so I started to print all the environment just before cx_Oracle.connect. The values were always good but the connection sometimes worked and sometimes not (as I already said) So i decided to modify Environment.c to inject an explicit setenv statement just before OCIEnvNlsCreate call. The result was the same: the connection sometimes worked and sometimes not. At a certain point I inserted an explicit printf statement in file Connection.c. The printf statement is located just before the Environment_NewFromScratch call The result is that everything works ... the problem is that OCIEnvNlsCreate is completelly black-box for me, I can't debug it in any way: is there any other check I can do? thanks for your patience, Marco On Thu, Feb 17, 2011 at 5:49 PM, Marco De Paoli <dep...@gm...> wrote: > On Wed, Feb 16, 2011 at 7:57 PM, Mark Harrison <mh...@pi...> wrote: >> >>> On 2/16/11 8:54 AM, Marco De Paoli wrote: >>> > everything works if I force the rebuild of a file named tests.pyc in a >>> django folder >>> > (via rm tests.pyc or via touch tests.pyc) >>> > >>> > if the file is already there I obtain "Unable to acquire Oracle >>> environment handle" >>> > >>> > Maybe it's an issue on the django side, but I can't undestand what >>> could be wrong... >>> > >>> > django is a pure python package and the question is: how can django >>> influence the OCIEnvNlsCreate call in Environment.c that, as far as I know, >>> doesn't get any login but just initialize a client data structure?!? >>> >>> >>> that one is weird. maybe you can do something like this: >>> >>> edit one or more of the django files, and put in >>> >>> conn=cx_Oracle.connect(...) >>> >>> calls. >>> >>> hopefully, the one at the very top of the first django file will be >>> successful. >>> eventually you will hit one that fails. then you can move the connect >>> lines >>> around to narrow down where the bad thing is happening. >>> >> > I injected conn=cx_Oracle.connect(...) all around django sources > > sometimes it works, other times it doesn't: I save a django file and > everything works fine, I try to lunch again and it doesn't work anymore > then I remove a pyc file and it works again, I lunch again and it works, > the third time it doesn't work anymore > > I'm sorry I cant' give you more precise infos... but I feel like I'm > chasing ghosts :( > > Marco > |
From: Uwe H. <uw...@fa...> - 2011-02-19 10:00:21
|
Hi, Am 19.02.2011 10:04, schrieb Massa, Harald Armin: > Hello Anthony, > > > And as a feedback to using the allready-existing-unicode builds: it > takes some time to convert the applications, BUT it really, really saves > a lot of hassle in the long run --- a lot of smal challenges with wrong > characters, surprising encodings... all went away. > i can only second this description: For me the "old" unicode build is very good. There is only one issue that i would address: The problem once reported by Michael Bayer "WITH_UNICODE in Python 2.x. Why ?" (non unicode (but string) bind variables are not rejected). http://permalink.gmane.org/gmane.comp.python.db.cx-oracle/2210 I made no tests with the trunk up to now. regards, Uwe |
From: Massa, H. A. <ch...@gh...> - 2011-02-19 09:04:54
|
Hello Anthony, mode. What this means is that for Python 2.x you can now use Unicode for > connection strings, SQL statements, etc. I only use the Win32-Versions of cx_Oracle; and that was exactly my experience from the existing *-unicode builds. Just that it was not a "can ... use", but a "must ... use"; that is: using the *-unicode build all "strings" have to be unicode. And all results are unicode, too. those who used the old unicode mode to test it out before I make a > new release (which will be 5.1). I use that older unicode build exclusively in an application. What I would need to run tests would be a win32-bundle. Would it be possible for you to make that available somewhere? And as a feedback to using the allready-existing-unicode builds: it takes some time to convert the applications, BUT it really, really saves a lot of hassle in the long run --- a lot of smal challenges with wrong characters, surprising encodings... all went away. best wishes Harald -- GHUM GmbH Harald Armin Massa Spielberger Straße 49 70435 Stuttgart 0173/9409607 Amtsgericht Stuttgart, HRB 734971 - persuadere. et programmare |
From: Anthony T. <ant...@gm...> - 2011-02-19 04:36:09
|
All, I have just checked in changes to cx_Oracle (Subversion trunk) to support using Unicode throughout and completely eliminated "unicode" mode. What this means is that for Python 2.x you can now use Unicode for connection strings, SQL statements, etc. The changes were quite substantial so even though the test suite passed without any errors I would still appreciate those who use unicode on a regular basis and/or those who used the old unicode mode to test it out before I make a new release (which will be 5.1). I will be testing it at work over the next week or so as well to see if any real-world situations turn up that were missed by the test suite. For the UnicodeVar part of the test suite you need to set NLS_LANG to .UTF8 or some other character set that supports unicode point 3042; otherwise, you will get errors. If you wish to return all strings as unicode, you can do this def OutputTypeHandler(cursor, name, defaultType, size, precision, scale): if defaultType in (cx_Oracle.STRING, cx_Oracle.FIXED_CHAR): return cursor.var(unicode, size, cursor.arraysize) connection = cx_Oracle.Connection("user/password@dsn") connection.outputtypehandler = OutputTypeHandler I am still considering whether or not to make that process a little simpler so if you have any opinions on that or suggestions about how to go about it, I'm all ears. :-) Thanks. Anthony |