cx-oracle-users Mailing List for cx_Oracle (Page 19)
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: Milt E. <mep...@il...> - 2014-07-04 15:22:29
|
OK, thanks for the response; I tried the alternatives mentioned in the other response, and they do confirm that this is an Oracle issue, and there are easy workarounds (and it doesn't really cause a problem, as long as you anticipate the behavior). On Fri, 4 Jul 2014, Vladimir Ryabtsev wrote: > 2014-07-04 0:03 GMT+04:00 Milt Epstein <mep...@il...>: > > > As you can see, the name of the second column has the comment line > > appended to it > > > > This is well-known Oracle issue: when you have a comment after an > expression the comment becomes column header. I don't think its by-design, > but I also don't think it should be considered as bug. You should just > remember about it. > Anyway it is not related to cx_Oracle. > Milt Epstein Applications Developer Graduate School of Library and Information Science (GSLIS) University of Illinois at Urbana-Champaign (UIUC) mep...@il... |
From: Milt E. <mep...@il...> - 2014-07-04 15:16:29
|
OK, I tried your alternatives, and with: 1. it had basically the same problem as the other comment style and 2. it worked, similarly as when I specified an alias with an "AS" (I mentioned this in my original note, but not so clearly) So, sounds like this is a known Oracle issue, and there are some workarounds. Thanks for your response! On Thu, 3 Jul 2014, Doug Henderson wrote: > On Thu, Jul 3, 2014 at 2:03 PM, Milt Epstein wrote: > > > ... > > SELECT ETL_CHAIN, max(COMPLETION_DT) > > -- SELECT * > > FROM ... > > ... > > > > ('ETL_CHAIN', <class 'cx_Oracle.STRING'>, 30, 30, 0, 0, 0) > > ('MAX(COMPLETION_DT)--SELECT*', <class 'cx_Oracle.DATETIME'>, 23, 7, 0, 0, > > 1) > > > > Two things to try to gain more understanding of the problem: > > 1. replace the "-- comment <NL>" with a "/* comment */" one. > > if you now see /* select **/ > (or some variation of it) in the column name you know it is > an oracle problem. > > 2. add a column alias, e.g. > /max(COMPLETION_DT)/ => /max(COMPLETION_DT) MAX_C_DT/ > > if you now see a column name of MAX_C_DT, you have solved the problem. > Always use a column alias when the column expression is not a legal > column name. > > > - Doug > > -- > Doug Henderson, Calgary, Alberta, Canada > Milt Epstein Applications Developer Graduate School of Library and Information Science (GSLIS) University of Illinois at Urbana-Champaign (UIUC) mep...@il... |
From: Vladimir R. <gre...@gm...> - 2014-07-03 23:04:57
|
2014-07-04 0:03 GMT+04:00 Milt Epstein <mep...@il...>: > As you can see, the name of the second column has the comment line > appended to it > This is well-known Oracle issue: when you have a comment after an expression the comment becomes column header. I don't think its by-design, but I also don't think it should be considered as bug. You should just remember about it. Anyway it is not related to cx_Oracle. |
From: Doug H. <djn...@gm...> - 2014-07-03 22:33:34
|
On Thu, Jul 3, 2014 at 2:03 PM, Milt Epstein wrote: > ... > SELECT ETL_CHAIN, max(COMPLETION_DT) > -- SELECT * > FROM ... > ... > > ('ETL_CHAIN', <class 'cx_Oracle.STRING'>, 30, 30, 0, 0, 0) > ('MAX(COMPLETION_DT)--SELECT*', <class 'cx_Oracle.DATETIME'>, 23, 7, 0, 0, > 1) > Two things to try to gain more understanding of the problem: 1. replace the "-- comment <NL>" with a "/* comment */" one. if you now see /* select **/ (or some variation of it) in the column name you know it is an oracle problem. 2. add a column alias, e.g. /max(COMPLETION_DT)/ => /max(COMPLETION_DT) MAX_C_DT/ if you now see a column name of MAX_C_DT, you have solved the problem. Always use a column alias when the column expression is not a legal column name. - Doug -- Doug Henderson, Calgary, Alberta, Canada |
From: Milt E. <mep...@il...> - 2014-07-03 20:03:19
|
I'm using cx_Oracle and I'm having an issue with cursor.description and what seems to be a combination of using an aggregating function and a comment in the SQL. My query looks like this: SELECT ETL_CHAIN, max(COMPLETION_DT) -- SELECT * FROM ... ... The query is actually stored in a file and I'm reading it in before running it (I'm just mentioning that -- I don't think there's any issue with it, since it works fine in other cases). As you can see, there's a line commented out in the query. Now when I use cursor.description to get info about the columns of the query results, this is what is returned: ('ETL_CHAIN', <class 'cx_Oracle.STRING'>, 30, 30, 0, 0, 0) ('MAX(COMPLETION_DT)--SELECT*', <class 'cx_Oracle.DATETIME'>, 23, 7, 0, 0, 1) As you can see, the name of the second column has the comment line appended to it (with the newline and spaces removed). This problem goes away and the column name is fine if, say, I switch the first two lines of the above query (so the comment appears first) or I don't use the function. It's also OK if I add an AS to the SELECT. (So there are workarounds, but ...) Any ideas what's going on? Is this a bug? It seems as if some extra processing is being done on the column name, and in this particular case, it's not working right. Thanks. Milt Epstein Applications Developer Graduate School of Library and Information Science (GSLIS) University of Illinois at Urbana-Champaign (UIUC) mep...@il... |
From: Anurag C. <anu...@gm...> - 2014-07-02 22:13:58
|
Found a solution.... In the base release of the Oracle 10gr2 client, there is a bug in the network layer. This layer have difficulties in coping with the round brackets () inside a path. My apache was installed in "C:\Program Files (x86)\..." More details at http://www.dbmotive.com/ora-06413-connection-not-open/ I reinstalled apache in a folder without () and voila!!! Regards, Guddu On Wed, Jul 2, 2014 at 5:04 PM, Anurag Chourasia <anu...@gm... > wrote: > I am using Windows 7 (64Bit) and from within the Python command prompt I > am able to connect to a Oracle database using cx_Oracle. > > When the same connection (With the same user/password etc) is made from a > Web Application (Django/mod_wsgi) then I get the error > > ORA-12154: TNS:could not resolve the connect identifier specified > > Here are my versions in use > > 1. Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit > (Intel)] on win32 > 2. cx_Oracle.version - '5.1.2' > 3. mod_wsgi‑3.5.ap22.win32‑py2.7.zip > 4. Oracle Release 10.2.0.1.0 > 5. httpd-2.2.25-win32-x86 > > > I am not sure why it would not work from within the Web App. Please help. > > Regards, > Guddu > |
From: Anurag C. <anu...@gm...> - 2014-07-02 21:04:48
|
I am using Windows 7 (64Bit) and from within the Python command prompt I am able to connect to a Oracle database using cx_Oracle. When the same connection (With the same user/password etc) is made from a Web Application (Django/mod_wsgi) then I get the error ORA-12154: TNS:could not resolve the connect identifier specified Here are my versions in use 1. Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] on win32 2. cx_Oracle.version - '5.1.2' 3. mod_wsgi‑3.5.ap22.win32‑py2.7.zip 4. Oracle Release 10.2.0.1.0 5. httpd-2.2.25-win32-x86 I am not sure why it would not work from within the Web App. Please help. Regards, Guddu |
From: Vladimir R. <gre...@gm...> - 2014-06-25 13:58:27
|
Hi. I have encountered a performance problem when inserting values into a column of CLOB datatype. For example I have a table: create table table_clob (msg_id number, message clob) Here is my code to reproduce the issue: ----- import time import cx_Oracle import sys print('Python', sys.version, 'on', sys.platform) print('cx_Oracle.version:', cx_Oracle.version) num_records = 100 con = cx_Oracle.connect('user/password@sid') print('DB version:', con.version) cur = con.cursor() cur.prepare("insert into table_clob (msg_id, message) values (:msg_id, :msg)") cur.bindarraysize = num_records msg_arr = cur.var(cx_Oracle.CLOB, arraysize=num_records) text = '$'*2**20 # 1 MB of text rows = [] # Prepare data. start_time = time.perf_counter() for id in range(num_records): msg_arr.setvalue(id, text) rows.append( (id, msg_arr) ) # Insert data. print('{} records prepared, {:.3f} s' .format(num_records, time.perf_counter() - start_time)) start_time = time.perf_counter() cur.executemany(None, rows) con.commit() print('{} records inserted, {:.3f} s' .format(num_records, time.perf_counter() - start_time)) cur.close() con.close() ----- which yields the results: ----- Python 3.3.2 (v3.3.2:d047928ae3f6, May 16 2013, 00:06:53) [MSC v.1600 64 bit (AMD64)] on win32 cx_Oracle.version: 5.1.3 DB version: 11.2.0.1.0 100 records prepared, 5.384 s 100 records inserted, 4.536 s ----- Versions of my DB and my client are the same. What's worrying me is the time of preparation of msg_arr structure. 5 seconds is abnormally much for copying of 100 MB in memory. 4.5 seconds seems OK for sending it over the network. The problematic step is msg_arr.setvalue(id, text). If I comment it, script takes just milliseconds to complete (inserting null into CLOB column of course). I also noticed a persistent disk activity during the "prepare" stage. Perhaps cx_Oracle library stores some data in temporary files on disk? This could be the reason of the problem... I wonder if there is a way to improve performance of "preparation" part of my code. Thanks in advance for your help. |
From: Scott K. <sko...@gm...> - 2014-06-03 21:17:38
|
Hello, I am using version 5.1.2 of cx_Oracle with >>> cx_Oracle.clientversion() (11, 2, 0, 3, 0) I am using it with SQLAlchemy 0.9.4 with Python 2.6.6 on RHEL 6.5. My simple application queries an LDAP directory to find particular records and then reflects the information into an Oracle table. The application is designed to keep the database table version of the information in sync with the LDAP directory as the system of record. Here is some pseudocode that shows the basic outline of what I am doing: class AdminGroup(Base): __tablename__ = 'admin_groups' id = Column(Integer, Sequence('seq_admin_groups_id'), primary_key = True) dn = Column(String) name = Column(String) display_name = Column(String) primary_mail = Column(String) def __repr__(self): return "<AdminGroup(dn='%s',name='%s',display_name='%s',primary_mail='%s')>" % ( self.dn, self.name, self.display_name, self.primary_mail) db_engine = create_engine(...) SessionClass = sessionmaker(bind = db_engine) # loop every N minutes session = SessionClass() ldap_groups = ldap_connection.search_ext_s(...) for dn, attr_dict in ldap_groups: # see if group is represented in database table admin_group = session.query(AdminGroup).filter(AdminGroup.dn == "%s" % dn).first() if admin_group: # group exists so see if any updates needed else: # create the group in the database table admin_group = AdminGroup(dn = dn, name = name, ...) session.add(admin_group) # done with all groups so commit and sleep until next iteration session.commit() Note that the class AdminGroup() is written to use the sequence seq_admin_groups_id to generate the primary key. I created the sequence in the Oracle database using sqlplus and the command: CREATE SEQUENCE seq_admin_groups_id START WITH 1 INCREMENT BY 1; COMMIT; I then ran the Python code and it performed as I expected, creating roughly 500 rows in the table. It continued to run fine for a few days, creating and deleting rows now and then. After a few days the code began throwing this exception: 2014-05-30 16:32:24,337 ERROR Master: Caught database exception while provisioning: (raised as a result of Query-invoked autoflush; consider using a session.no_autoflush block if this flush is occuring prematurely) (IntegrityError) ORA-00001: unique constraint (MYSCHEMA.SYS_C0015706) violated 'INSERT INTO admin_groups (id, dn, name, display_name, primary_mail) VALUES (seq_admin_groups_id.nextval, :dn, :name, :display_name, :primary_mail) RETURNING admin_groups.id INTO :ret_0' {'dn': 'cn=somename,ou=groups,dc=bc,dc=edu', 'primary_mail': 'som...@my...', 'display_name': 'somename', 'name': 'somename', 'ret_0': <cx_Oracle.NUMBER with value None>} I investigated and found that the sequence seq_admin_groups_id was now at the value 68 after having been used previously to insert rows with IDs in the 500s. I stopped the code and used sqlplus to change the sequence back to a value in the high 500s. I then restarted the code and the exception no longer occurred. I am unable to explain how the sequence seq_admin_groups_id went from in the 500s and working fine to suddenly being 68. The only place in the Python code where the sequence is used explicitly is in the definition of the AdminGroup() class. I would be grateful for any insights on how the sequence might have become out of sync or anything I can change in the code to prevent it from happening again. Thank you for your consideration. Scott P.S. I should add that I am using the connection string oracle+cx_oracle://user:password@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=somehost)(PORT=1521)))(CONNECT_DATA=(SID=MYSID))) |
From: Anthony T. <ant...@gm...> - 2014-05-28 04:32:13
|
On Tue, May 27, 2014 at 10:19 PM, Raymond Tau <ray...@tr...>wrote: > Anthony Tuininga <anthony.tuininga@...> writes: > > > > > > > Hi, > > I suspect that is due to the fact that PyPI used to scrape the download > pages > > and now does not do so. Of course the immediate question is why you are > > installing 5.1.1 when 5.1.3 was just released? If you really need it you > can > > download it yourself directly from SourceForge (which is where I used to > > host the files) but I have no intentions of uploading the older versions > to > > PyPI! > > > > Anthony > > > > > > On Mon, May 26, 2014 at 9:17 PM, Raymond Tau <raymond.tau- > lSjQ/mva...@pu...> wrote:Hi, > > Starting from 26 May, we found that we could not install cx-Oracle 5.1.1 > > using pip. Previously, that was running fine. May I know if that is an > > accident or intentional? Here is the output when I tried to install > > cx-Oracle 5.1.1: > > > (testaaa)Sparrow:bin raymondtau$ pip install cx-Oracle==5.1.1 > > > Downloading/unpacking cx-Oracle==5.1.1 > > > Could not find a version that satisfies the requirement > cx-Oracle==5.1.1 > > > (from versions: 5.1.3) > > > Cleaning up... > > > No distributions matching the version for cx-Oracle==5.1.1 > > > Storing complete log in /Users/raymondtau/.pip/pip.log > > Thanks. > > Hi, > > We have some existing program which use 5.1.1, so we want to use that for > new > installation as well until we have time to test that with 5.1.3. > Makes sense. :-) For your information, I could install 5.1.1 version with this command: > pip install \ > -f http://downloads.sourceforge.net/project/cx-oracle/5.1.1/\ > cx_Oracle-5.1.1.tar.gz cx-Oracle==5.1.1 > Thanks for posting this for anyone else who might run into the same difficulties. Anthony |
From: Raymond T. <ray...@tr...> - 2014-05-28 04:25:14
|
Anthony Tuininga <anthony.tuininga@...> writes: > > > Hi, > I suspect that is due to the fact that PyPI used to scrape the download pages > and now does not do so. Of course the immediate question is why you are > installing 5.1.1 when 5.1.3 was just released? If you really need it you can > download it yourself directly from SourceForge (which is where I used to > host the files) but I have no intentions of uploading the older versions to > PyPI! > > Anthony > > > On Mon, May 26, 2014 at 9:17 PM, Raymond Tau <raymond.tau- lSjQ/mva...@pu...> wrote:Hi, > Starting from 26 May, we found that we could not install cx-Oracle 5.1.1 > using pip. Previously, that was running fine. May I know if that is an > accident or intentional? Here is the output when I tried to install > cx-Oracle 5.1.1: > > (testaaa)Sparrow:bin raymondtau$ pip install cx-Oracle==5.1.1 > > Downloading/unpacking cx-Oracle==5.1.1 > > Could not find a version that satisfies the requirement cx-Oracle==5.1.1 > > (from versions: 5.1.3) > > Cleaning up... > > No distributions matching the version for cx-Oracle==5.1.1 > > Storing complete log in /Users/raymondtau/.pip/pip.log > Thanks. Hi, We have some existing program which use 5.1.1, so we want to use that for new installation as well until we have time to test that with 5.1.3. For your information, I could install 5.1.1 version with this command: pip install \ -f http://downloads.sourceforge.net/project/cx-oracle/5.1.1/\ cx_Oracle-5.1.1.tar.gz cx-Oracle==5.1.1 Thanks. |
From: Shai B. <sh...@pl...> - 2014-05-27 06:29:16
|
Hi, On Tuesday 27 May 2014 06:17:23 Raymond Tau wrote: > > Starting from 26 May, we found that we could not install cx-Oracle 5.1.1 using pip. Previously, that was running fine. May I know if that is an accident or intentional? Here is the output when I tried to install cx-Oracle 5.1.1: > > (testaaa)Sparrow:bin raymondtau$ pip install cx-Oracle==5.1.1 > > Downloading/unpacking cx-Oracle==5.1.1 > > > > Could not find a version that satisfies the requirement > > cx-Oracle==5.1.1 (from versions: 5.1.3) > > > > Cleaning up... > > No distributions matching the version for cx-Oracle==5.1.1 > > Storing complete log in /Users/raymondtau/.pip/pip.log > I suppose that this is the cumulative result of: 1) pip no longer installing packages hosted off of PyPI (see thread in this list titled """cx-oracle 5.1.2 "externalized" from PyPI?""") and 2) the fact that 5.1.3, released yesterday, is hosted on PyPI. The flags mentioned in the older thread may (or may not; haven't tried) help you install the older version via pip. HTH, Shai. |
From: Anthony T. <ant...@gm...> - 2014-05-27 04:19:22
|
Hi, I suspect that is due to the fact that PyPI used to scrape the download pages and now does not do so. Of course the immediate question is why you are installing 5.1.1 when 5.1.3 was just released? If you really need it you can download it yourself directly from SourceForge (which is where I used to host the files) but I have no intentions of uploading the older versions to PyPI! Anthony On Mon, May 26, 2014 at 9:17 PM, Raymond Tau <ray...@tr...>wrote: > Hi, > > Starting from 26 May, we found that we could not install cx-Oracle 5.1.1 > using pip. Previously, that was running fine. May I know if that is an > accident or intentional? Here is the output when I tried to install > cx-Oracle 5.1.1: > > > (testaaa)Sparrow:bin raymondtau$ pip install cx-Oracle==5.1.1 > > Downloading/unpacking cx-Oracle==5.1.1 > > Could not find a version that satisfies the requirement > cx-Oracle==5.1.1 (from versions: 5.1.3) > > Cleaning up... > > No distributions matching the version for cx-Oracle==5.1.1 > > Storing complete log in /Users/raymondtau/.pip/pip.log > > > Thanks. > > > ------------------------------------------------------------------------------ > The best possible search technologies are now affordable for all companies. > Download your FREE open source Enterprise Search Engine today! > Our experts will assist you in its installation for $59/mo, no commitment. > Test it for FREE on our Cloud platform anytime! > > http://pubads.g.doubleclick.net/gampad/clk?id=145328191&iu=/4140/ostg.clktrk > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Raymond T. <ray...@tr...> - 2014-05-27 03:45:10
|
Hi, Starting from 26 May, we found that we could not install cx-Oracle 5.1.1 using pip. Previously, that was running fine. May I know if that is an accident or intentional? Here is the output when I tried to install cx-Oracle 5.1.1: > (testaaa)Sparrow:bin raymondtau$ pip install cx-Oracle==5.1.1 > Downloading/unpacking cx-Oracle==5.1.1 > Could not find a version that satisfies the requirement cx-Oracle==5.1.1 (from versions: 5.1.3) > Cleaning up... > No distributions matching the version for cx-Oracle==5.1.1 > Storing complete log in /Users/raymondtau/.pip/pip.log Thanks. |
From: Anthony T. <ant...@gm...> - 2014-05-25 04:39:15
|
What is cx_Oracle? cx_Oracle is a Python extension module that enables access to Oracle for Python 2.x and 3.x and conforms to the Python database API 2.0 specifications with a number of enhancements. Where do I get it? http://cx-oracle.sourceforge.net What's new? http://cx-oracle.readthedocs.org/en/latest/releasenotes.html |
From: Anthony T. <ant...@gm...> - 2014-05-21 00:15:17
|
Hi Chris, Since Python distutils does such a poor job of creating RPMs I am going to stop producing those since I am no expert in such things! If someone wishes to provide a custom RPM spec that I can use I have no problem continuing to build such. The same goes for Debian. I can create a virtual machine running Debian relatively easily. For OS X, however, I would need more help as I am not a Mac expert. I have a Mac that I can use but someone would need to help me with the generation of DMG files. Anthony On Tue, May 20, 2014 at 2:08 PM, Christopher Jones < chr...@or...> wrote: > > > On 05/19/2014 09:36 PM, Anthony Tuininga wrote: > > All, > > > > Just thought I would let you know that I have modified the documentation > and run the tests and all appears to be well for a 5.1.3 release later this > week. I just didn't get a chance to produce all of > > the binaries this weekend as I had hoped. Sorry for the delay! > > > > Anthony > > Hi Anthony, > > Thanks for > > What would it take to have Debian and OS X packages built too?! > > Chris > > -- > chr...@or... http://twitter.com/ghrd > Free PHP & Oracle book: > > http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform > available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Christopher J. <chr...@or...> - 2014-05-20 20:08:16
|
On 05/19/2014 09:36 PM, Anthony Tuininga wrote: > All, > > Just thought I would let you know that I have modified the documentation and run the tests and all appears to be well for a 5.1.3 release later this week. I just didn't get a chance to produce all of > the binaries this weekend as I had hoped. Sorry for the delay! > > Anthony Hi Anthony, Thanks for What would it take to have Debian and OS X packages built too?! Chris -- chr...@or... http://twitter.com/ghrd Free PHP & Oracle book: http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html |
From: Anthony T. <ant...@gm...> - 2014-05-20 04:36:20
|
All, Just thought I would let you know that I have modified the documentation and run the tests and all appears to be well for a 5.1.3 release later this week. I just didn't get a chance to produce all of the binaries this weekend as I had hoped. Sorry for the delay! Anthony |
From: Anthony T. <ant...@gm...> - 2014-05-16 14:10:31
|
You're welcome. And thanks for letting us know so quickly that the problem has been resolved! On Fri, May 16, 2014 at 3:06 AM, Shai Berger <sh...@pl...> wrote: > I've just run the tests for Django 1.6.X on both Python 3.3 and 3.4, and > encountered no segmentation fault. > > Thanks to you and the community for solving this, > > Shai. > > On Friday 16 May 2014 06:43:05 Anthony Tuininga wrote: > > Recently a bug fix was made for exceptions within exceptions on Python > 3.4. > > Perhaps Django is exercising that issue? If so, it has been resolved. I > > would appreciate you letting me know as I hope to make a new release this > > weekend if possible! > > > > Anthony > > > > On Mon, Apr 7, 2014 at 1:43 AM, Shai Berger <sh...@pl...> wrote: > > > On Wednesday 02 April 2014 16:12:50 Shai Berger wrote: > > > > Hi, > > > > > > > > On Monday 31 March 2014 23:09:24 Anthony Tuininga wrote: > > > > > I am hoping to have a new release made sometime next week at the > > > > > > latest. > > > > > > > At first I was quite alarmed at this, since the Django test-suite > gets > > > > segfaults out of cx_Oracle 5.1.2 with Python 3 and none of the > commits > > > > since then seemed to address that; but I am happy to report that, > using > > > > the current tip, I was able to run the full Django test-suite on both > > > > Python 3.3 and 3.4 (it doesn't pass yet, but we can probably solve > the > > > > problems in Python code). > > > > > > I am also sorry to report that the above happy report was premature -- > > > the test suite completes with Python3 on the master branch and the > > > upcoming 1.7 branches of Django, but the 1.6.X branch still segfaults. > > > I'd like to fix this > > > before the next release as well. > > > > > > Shai. > > > > > > > > > > ------------------------------------------------------------------------- > > > ----- Put Bad Developers to Shame > > > Dominate Development with Jenkins Continuous Integration > > > Continuously Automate Build, Test & Deployment > > > Start a new project now. Try Jenkins in the cloud. > > > http://p.sf.net/sfu/13600_Cloudbees_APR > > > _______________________________________________ > > > cx-oracle-users mailing list > > > cx-...@li... > > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform > available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Shai B. <sh...@pl...> - 2014-05-16 09:06:39
|
I've just run the tests for Django 1.6.X on both Python 3.3 and 3.4, and encountered no segmentation fault. Thanks to you and the community for solving this, Shai. On Friday 16 May 2014 06:43:05 Anthony Tuininga wrote: > Recently a bug fix was made for exceptions within exceptions on Python 3.4. > Perhaps Django is exercising that issue? If so, it has been resolved. I > would appreciate you letting me know as I hope to make a new release this > weekend if possible! > > Anthony > > On Mon, Apr 7, 2014 at 1:43 AM, Shai Berger <sh...@pl...> wrote: > > On Wednesday 02 April 2014 16:12:50 Shai Berger wrote: > > > Hi, > > > > > > On Monday 31 March 2014 23:09:24 Anthony Tuininga wrote: > > > > I am hoping to have a new release made sometime next week at the > > > > latest. > > > > > At first I was quite alarmed at this, since the Django test-suite gets > > > segfaults out of cx_Oracle 5.1.2 with Python 3 and none of the commits > > > since then seemed to address that; but I am happy to report that, using > > > the current tip, I was able to run the full Django test-suite on both > > > Python 3.3 and 3.4 (it doesn't pass yet, but we can probably solve the > > > problems in Python code). > > > > I am also sorry to report that the above happy report was premature -- > > the test suite completes with Python3 on the master branch and the > > upcoming 1.7 branches of Django, but the 1.6.X branch still segfaults. > > I'd like to fix this > > before the next release as well. > > > > Shai. > > > > > > ------------------------------------------------------------------------- > > ----- Put Bad Developers to Shame > > Dominate Development with Jenkins Continuous Integration > > Continuously Automate Build, Test & Deployment > > Start a new project now. Try Jenkins in the cloud. > > http://p.sf.net/sfu/13600_Cloudbees_APR > > _______________________________________________ > > cx-oracle-users mailing list > > cx-...@li... > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Shai B. <sh...@pl...> - 2014-05-16 08:01:49
|
Actually, this is an Oracle limitation: You cannot use bound variables in DDL statements (such as CREATE TABLE), even though it does make sense for CREATE TABLE AS SELECT. You need to construct the statement as a string in SQL and execute it using DBMS_UTILITY.EXEC_DDL_STATEMENT or Execute Immediate. See for example http://www.dbforums.com/oracle/783494-include-variables-witihin-ddl-pl-sql-block.html Just make sure your "datep" variable is properly sanitized (or does not come from user-supplied data) because otherwise you open yourself to SQL injections. HTH, Shai. On Friday 16 May 2014 06:46:54 Anthony Tuininga wrote: > No special syntax is required for create table. Illegal variable > name/number means that (a) the name you are using doesn't match the name > you are passing or (b) the name you are using is illegal. These can > sometimes be tough to find! When this sort of thing happens to me I simply > replace bits and pieces until I figure out what the trouble is. Good luck! > > Anthony > > On Fri, May 2, 2014 at 11:44 AM, Marcus Diniz <md...@gm...> wrote: > > Hello there > > > > > > I'm trying to CREATE TABLE AS using cx_Oracle on Python 2.4.6 > > > > The following code: > > query = '''CREATE TABLE TMP_STATS_1 AS > > select NUM from INF_CARD where IMPORT_DATE between > > to_date(:datepass || ' 00:00:00','dd/mm/yyyy hh24:mi:ss') and > > to_date(:datepass || ' 23:59:59','dd/mm/yyyy hh24:mi:ss')''' > > curs.execute(query, datepass=datep) > > > > Returns: cx_Oracle.DatabaseError: ORA-01036: illegal variable name/number > > > > Taking out the CREATE TABLE TMP_STATS_1 AS and leaving only the SELECT > > statement, works perfectly. Also, when using CREATE TABLE AS statement on > > SQLPLUS it runs correctly. > > > > Is there any specific syntax for CREATE TABLE AS to be used in cx_Oracle? > > Tried to find examples for this, but none found so far. > > > > Regards, > > Marcus > > > > > > > > > > ------------------------------------------------------------------------- > > ----- "Accelerate Dev Cycles with Automated Cross-Browser Testing - For > > FREE Instantly run your Selenium tests across 300+ browser/OS combos. > > Get unparalleled scalability from the best Selenium testing platform > > available. Simple to use. Nothing to install. Get started now for free." > > http://p.sf.net/sfu/SauceLabs > > _______________________________________________ > > cx-oracle-users mailing list > > cx-...@li... > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Anthony T. <ant...@gm...> - 2014-05-16 03:47:02
|
No special syntax is required for create table. Illegal variable name/number means that (a) the name you are using doesn't match the name you are passing or (b) the name you are using is illegal. These can sometimes be tough to find! When this sort of thing happens to me I simply replace bits and pieces until I figure out what the trouble is. Good luck! Anthony On Fri, May 2, 2014 at 11:44 AM, Marcus Diniz <md...@gm...> wrote: > Hello there > > > I'm trying to CREATE TABLE AS using cx_Oracle on Python 2.4.6 > The following code: > > query = '''CREATE TABLE TMP_STATS_1 AS > select NUM from INF_CARD where IMPORT_DATE between > to_date(:datepass || ' 00:00:00','dd/mm/yyyy hh24:mi:ss') and > to_date(:datepass || ' 23:59:59','dd/mm/yyyy hh24:mi:ss')''' > curs.execute(query, datepass=datep) > > > Returns: cx_Oracle.DatabaseError: ORA-01036: illegal variable name/number > > Taking out the CREATE TABLE TMP_STATS_1 AS and leaving only the SELECT > statement, works perfectly. Also, when using CREATE TABLE AS statement on > SQLPLUS it runs correctly. > > Is there any specific syntax for CREATE TABLE AS to be used in cx_Oracle? > Tried to find examples for this, but none found so far. > > Regards, > Marcus > > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. Get > unparalleled scalability from the best Selenium testing platform available. > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Anthony T. <ant...@gm...> - 2014-05-16 03:43:14
|
Recently a bug fix was made for exceptions within exceptions on Python 3.4. Perhaps Django is exercising that issue? If so, it has been resolved. I would appreciate you letting me know as I hope to make a new release this weekend if possible! Anthony On Mon, Apr 7, 2014 at 1:43 AM, Shai Berger <sh...@pl...> wrote: > On Wednesday 02 April 2014 16:12:50 Shai Berger wrote: > > Hi, > > > > On Monday 31 March 2014 23:09:24 Anthony Tuininga wrote: > > > I am hoping to have a new release made sometime next week at the > latest. > > > > At first I was quite alarmed at this, since the Django test-suite gets > > segfaults out of cx_Oracle 5.1.2 with Python 3 and none of the commits > > since then seemed to address that; but I am happy to report that, using > > the current tip, I was able to run the full Django test-suite on both > > Python 3.3 and 3.4 (it doesn't pass yet, but we can probably solve the > > problems in Python code). > > > I am also sorry to report that the above happy report was premature -- the > test suite completes with Python3 on the master branch and the upcoming 1.7 > branches of Django, but the 1.6.X branch still segfaults. I'd like to fix > this > before the next release as well. > > Shai. > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees_APR > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Krishna M. IV <kri...@or...> - 2014-05-15 12:13:30
|
Hi Anthony, does it require a new binary for Oracle 12c? The existing one should work with 12c client also, right? Unless you are adding some 12c specific features... thanks, krishna On 5/14/2014 7:45 PM, Anthony Tuininga wrote: > I am hoping this weekend to make a new release. It has been far too > long! I need binaries for Python 3.4 and Oracle 12c at the least. :-) > > > On Wed, May 14, 2014 at 6:28 AM, Boris Dzuba <bor...@gm... > <mailto:bor...@gm...>> wrote: > > Thank you for the quick response. Do you already have any plans, > when will new version be released ? > > > 2014-05-13 23:17 GMT+02:00 Anthony Tuininga > <ant...@gm... <mailto:ant...@gm...>>: > > Thanks for the simple program to demonstrate the problem. :-) > I have just pushed a change to the source that resolves this > issue. Apparently in Python 3 the first time the exception is > referenced it is not normalized and so the error object I am > creating is immediately accessible. The second level of > exception results in a normalized exception which means that > it can't be accessed in the same way. Fortunately the > normalization can be forced so that I can access the error > object the same way each time. A subtle and rare bug so I > appreciate the pointer! > > Anthony > > > On Tue, May 13, 2014 at 1:15 AM, Boris Dzuba > <bor...@gm... <mailto:bor...@gm...>> wrote: > > Hi all, > > The following test program gives a segmentation fault: > > C:\>python > Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:19:30) > [MSC v.1600 64 bit (AMD64)] on win32 > Type "help", "copyright", "credits" or "license" for more > information. > >>> import cx_Oracle > >>> c=cx_Oracle.connect(<connect string>).cursor() > >>> try: > ... c.execute("select") > ... except: > ... try: > ... c.execute("select") > ... except: > ... pass > ... > > C:\> > > Access Violation > Faulting application name: python.exe > Fault offset: 0x000000000000cacd > > > Platform: 64bit, Win7, Oracle Client 11g (11.2.0.1.0), > python 3.3.3, cx_Oracle 5.1.2 > > > > At a guess, the problem is because in the function > Cursor_SetErrorOffset() /Cursor.c/: > > static void Cursor_SetErrorOffset( > udt_Cursor *self) // cursor to get the error offset from > { > PyObject *type, *value, *traceback; > udt_Error *error; > > PyErr_Fetch(&type, &value, &traceback); > if (type == g_DatabaseErrorException) { > error = (udt_Error*) value; > OCIAttrGet(self->handle, OCI_HTYPE_STMT, > &error->offset, 0, > OCI_ATTR_PARSE_ERROR_OFFSET, self->environment->errorHandle); > } > PyErr_Restore(type, value, traceback); > } > OCIAttrGet() call attempts to write a value to the address > /&error->offset/, > therefore after the end of an allocated memory block of > the borrowed pointer /PyObject *value/ > > typedef struct { > PyObject_HEAD > sb4 code; > ub4 offset; > PyObject *message; > const char *context; > } udt_Error; > > > Commenting it out /* OCIAttrGet(self->handle, > OCI_HTYPE_STMT, &error->offset, 0, > OCI_ATTR_PARSE_ERROR_OFFSET, > self->environment->errorHandle);*/ > fix this crash! > > > Regards, > Boris > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser > Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS > combos. > Get unparalleled scalability from the best Selenium > testing platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > <mailto:cx-...@li...> > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - > For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing > platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > <mailto:cx-...@li...> > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing > platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > <mailto:cx-...@li...> > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Anthony T. <ant...@gm...> - 2014-05-14 14:15:36
|
I am hoping this weekend to make a new release. It has been far too long! I need binaries for Python 3.4 and Oracle 12c at the least. :-) On Wed, May 14, 2014 at 6:28 AM, Boris Dzuba <bor...@gm...> wrote: > Thank you for the quick response. Do you already have any plans, when will > new version be released ? > > > 2014-05-13 23:17 GMT+02:00 Anthony Tuininga <ant...@gm...>: > >> Thanks for the simple program to demonstrate the problem. :-) I have just >> pushed a change to the source that resolves this issue. Apparently in >> Python 3 the first time the exception is referenced it is not normalized >> and so the error object I am creating is immediately accessible. The second >> level of exception results in a normalized exception which means that it >> can't be accessed in the same way. Fortunately the normalization can be >> forced so that I can access the error object the same way each time. A >> subtle and rare bug so I appreciate the pointer! >> >> Anthony >> >> >> On Tue, May 13, 2014 at 1:15 AM, Boris Dzuba <bor...@gm...>wrote: >> >>> Hi all, >>> >>> The following test program gives a segmentation fault: >>> >>> C:\>python >>> Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:19:30) [MSC v.1600 64 >>> bit (AMD64)] on win32 >>> Type "help", "copyright", "credits" or "license" for more information. >>> >>> import cx_Oracle >>> >>> c=cx_Oracle.connect(<connect string>).cursor() >>> >>> try: >>> ... c.execute("select") >>> ... except: >>> ... try: >>> ... c.execute("select") >>> ... except: >>> ... pass >>> ... >>> >>> C:\> >>> >>> Access Violation >>> Faulting application name: python.exe >>> Fault offset: 0x000000000000cacd >>> >>> >>> Platform: 64bit, Win7, Oracle Client 11g (11.2.0.1.0), python 3.3.3, >>> cx_Oracle 5.1.2 >>> >>> >>> >>> At a guess, the problem is because in the function >>> Cursor_SetErrorOffset() /Cursor.c/: >>> >>> static void Cursor_SetErrorOffset( >>> udt_Cursor *self) // cursor to get the error >>> offset from >>> { >>> PyObject *type, *value, *traceback; >>> udt_Error *error; >>> >>> PyErr_Fetch(&type, &value, &traceback); >>> if (type == g_DatabaseErrorException) { >>> error = (udt_Error*) value; >>> OCIAttrGet(self->handle, OCI_HTYPE_STMT, &error->offset, 0, >>> OCI_ATTR_PARSE_ERROR_OFFSET, >>> self->environment->errorHandle); >>> } >>> PyErr_Restore(type, value, traceback); >>> } >>> >>> OCIAttrGet() call attempts to write a value to the address >>> /&error->offset/, >>> therefore after the end of an allocated memory block of the borrowed >>> pointer /PyObject *value/ >>> >>> typedef struct { >>> PyObject_HEAD >>> sb4 code; >>> ub4 offset; >>> PyObject *message; >>> const char *context; >>> } udt_Error; >>> >>> >>> Commenting it out /* OCIAttrGet(self->handle, OCI_HTYPE_STMT, >>> &error->offset, 0, OCI_ATTR_PARSE_ERROR_OFFSET, >>> self->environment->errorHandle);*/ >>> fix this crash! >>> >>> >>> Regards, >>> Boris >>> >>> >>> ------------------------------------------------------------------------------ >>> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >>> Instantly run your Selenium tests across 300+ browser/OS combos. >>> Get unparalleled scalability from the best Selenium testing platform >>> available >>> Simple to use. Nothing to install. Get started now for free." >>> http://p.sf.net/sfu/SauceLabs >>> _______________________________________________ >>> cx-oracle-users mailing list >>> cx-...@li... >>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >>> >>> >> >> >> ------------------------------------------------------------------------------ >> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE >> Instantly run your Selenium tests across 300+ browser/OS combos. >> Get unparalleled scalability from the best Selenium testing platform >> available >> Simple to use. Nothing to install. Get started now for free." >> http://p.sf.net/sfu/SauceLabs >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> > > > ------------------------------------------------------------------------------ > "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE > Instantly run your Selenium tests across 300+ browser/OS combos. > Get unparalleled scalability from the best Selenium testing platform > available > Simple to use. Nothing to install. Get started now for free." > http://p.sf.net/sfu/SauceLabs > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |