cx-oracle-users Mailing List for cx_Oracle
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: Leung A. <leu...@ho...> - 2023-02-13 03:22:32
|
Hi All, We are using cx-oracle-5.1 with Oracle client 11.2.0.1 to connect to the Oracle 12c server. However, we are planning to upgrade the Oracle server to 19c. Is there any way to keep to use the cx-Oracle-5.1 version so we don't need to change to much on the application side ? Any feedback is welcome. Regards, Alvin |
From: Christopher J. <chr...@or...> - 2022-05-26 23:14:11
|
A new, major Python cx_Oracle driver release for Oracle Database is available and comes with a brand new name: python-oracledb. The python-oracledb driver is now 'Thin' by default, making it easier (and faster) to install and use. See the release announcement https://cjones-oracle.medium.com/open-source-python-thin-driver-for-oracle-database-e82aac7ecf5a for detail There are new URLs: - Repo: https://github.com/oracle/python-oracledb - PyPI: https://pypi.org/project/oracledb/ - Discussion, which had naturally been migrating for a long time from this mail list to the cx_Oracle GitHub repo, can now be done at https://github.com/oracle/python-oracledb/discussions "Need to Know": - Python-oracledb is the new name for our popular Python cx_Oracle driver for Oracle Database - Python-oracledb 1.0 is a new major release - the successor to cx_Oracle 8.3 - Python-oracledb is simple and small to install — under 15 MB (including Python package dependencies): pip install oracledb - Python-oracledb is now a Thin driver by default - it connects directly to Oracle Database without always needing Oracle Client libraries - Python-oracledb runs on many platforms including favorites like Linux, macOS and Windows. It can also be used on platforms where Oracle Client libraries are not available (such as Apple M1, Alpine Linux, or IoT devices), or where the client libraries are not easily installed (such as some cloud environments). - Python-oracledb has comprehensive functionality conforming to the Python Database API v2.0 Specification, with many additions and just a couple of exclusions. - A “Thick” mode can be optionally enabled by an application call. This mode has similar functionality to cx_Oracle and supports Oracle Database features that extend the Python DB API. To use this mode, the widely used and tested Oracle Client libraries such as from Oracle Instant Client must be installed separately. - SQLAlchemy, Pandas, Django and other frameworks and libraries can immediately start testing python-oracledb in Thin or Thick mode by adding several lines of code. This won’t be necessary in future when framework and ORM maintainers add equivalent code to use the new namespace. Note that some functionality like dead-connection-detection may not work until the maintainers add support. -- https://twitter.com/ghrd |
From: Anthony T. <ant...@gm...> - 2021-11-04 22:17:54
|
What is cx_Oracle? cx_Oracle is a Python extension module that enables access to Oracle Database for Python and conforms to the Python database API 2.0 specifications with a number of enhancements. Where do I get it? https://oracle.github.io/python-cx_Oracle The easiest method to install/upgrade cx_Oracle is via pip as in python -m pip install cx_Oracle --upgrade What's new? See the full release notes for all of the details: https://cx-oracle.readthedocs.io/en/latest/release_notes.html#version-8-3-november-2021 Please provide any feedback via GitHub issues ( https://github.com/oracle/python-cx_Oracle/issues). |
From: Anthony T. <ant...@gm...> - 2021-06-01 19:22:22
|
What is cx_Oracle? cx_Oracle is a Python extension module that enables access to Oracle Database for Python and conforms to the Python database API 2.0 specifications with a number of enhancements. Where do I get it? https://oracle.github.io/python-cx_Oracle The easiest method to install/upgrade cx_Oracle is via pip as in python -m pip install cx_Oracle --upgrade What's new? See the full release notes for all of the details: https://cx-oracle.readthedocs.io/en/latest/release_notes.html#version-8-2-1-june-2021 Please provide any feedback via GitHub issues ( https://github.com/oracle/python-cx_Oracle/issues). |
From: Anthony T. <ant...@gm...> - 2021-05-19 00:26:14
|
What is cx_Oracle? cx_Oracle is a Python extension module that enables access to Oracle Database for Python and conforms to the Python database API 2.0 specifications with a number of enhancements. Where do I get it? https://oracle.github.io/python-cx_Oracle The easiest method to install/upgrade cx_Oracle is via pip as in python -m pip install cx_Oracle --upgrade What's new? See the full release notes for all of the details: https://cx-oracle.readthedocs.io/en/latest/release_notes.html#version-8-2-may-2021 Please provide any feedback via GitHub issues ( https://github.com/oracle/python-cx_Oracle/issues). |
From: ConcreteVitamin <con...@gm...> - 2021-05-03 17:38:24
|
Hi Suraj - thanks for the reply. The last ODPI debug message being printed was ODPI [84562] 2021-05-03 17:04:34.197: fn start dpiStmt_execute(0x563b2b78a050) Namely the client hangs at cursor.execute(). FYI per Anthony's suggestion I've filed https://github.com/oracle/python-cx_Oracle/issues/559, with more detailed info included. On Mon, May 3, 2021 at 9:49 AM Suraj Shaw <sur...@or...> wrote: > Hey, > > > > How does the client stack trace look when the server CPU usage stops? > > > > Thanks > > suraj > |
From: ConcreteVitamin <con...@gm...> - 2021-05-03 17:35:09
|
Hi Anthony - thanks for the reply. I've filed https://github.com/oracle/python-cx_Oracle/issues/559, with more detailed info included (e.g., setting DPI_DEBUG_LEVEL to 15). On Mon, May 3, 2021 at 9:53 AM Anthony Tuininga <ant...@gm...> wrote: > Hi, > > First, this e-mail list is no longer used very much. I would suggest > adding an issue here: https://github.com/oracle/python-cx_Oracle/issues. > You're more likely to get help there. > > Second, you need to set DPI_DEBUG_LEVEL to the value 4, not 64. 64 is used > for logging messages while the library is being loaded and 4 is used for > logging ODPI-C calls -- which is what you want in this case. That said, you > should *still* see messages -- even if only the one saying that debugging > messages have been initialized. So double check that the environment > variable is in fact being set! > > Finally, I have no idea why SQL*Plus would "work" and cx_Oracle "would not > work" since they use the same libraries. It might be helpful to show the > cx_Oracle code you are using. > > Anthony > > On Sat, May 1, 2021 at 11:46 PM ConcreteVitamin <con...@gm...> > wrote: > >> Hi there, >> >> I've a weird statement that's pretty expensive. Entering this SQL >> statement in sqlplus eventually leads to this error: >> >> ERROR at line 1: >> ORA-01652: unable to extend temp segment by 128 in tablespace TEMP >> >> This is expected & good. >> >> However, using cx_Oracle, specifically using >> >> cursor.execute(same_statement) >> >> would result in the same amount of work being done, and at some point the >> CPU utilization on the server stopped -- which meant ORA-01652 has happened >> -- but the cursor.execute(...) call stays blocked without raising an >> exception. This makes the app stay in a stuck state. At that point it >> doesn't respond to Ctrl-C SIGINT. >> >> I've tried export DPI_DEBUG_LEVEL=64 and there are no messages being >> printed. >> >> What's wrong? Is it possible to enable an exception to be raised? >> >> Server: 19c [where sqlplus was run] >> cx_Oracle: 8.1 [different host from the server; using same DSN as sqlplus] >> >> Thanks. >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Anthony T. <ant...@gm...> - 2021-05-03 16:52:43
|
Hi, First, this e-mail list is no longer used very much. I would suggest adding an issue here: https://github.com/oracle/python-cx_Oracle/issues. You're more likely to get help there. Second, you need to set DPI_DEBUG_LEVEL to the value 4, not 64. 64 is used for logging messages while the library is being loaded and 4 is used for logging ODPI-C calls -- which is what you want in this case. That said, you should *still* see messages -- even if only the one saying that debugging messages have been initialized. So double check that the environment variable is in fact being set! Finally, I have no idea why SQL*Plus would "work" and cx_Oracle "would not work" since they use the same libraries. It might be helpful to show the cx_Oracle code you are using. Anthony On Sat, May 1, 2021 at 11:46 PM ConcreteVitamin <con...@gm...> wrote: > Hi there, > > I've a weird statement that's pretty expensive. Entering this SQL > statement in sqlplus eventually leads to this error: > > ERROR at line 1: > ORA-01652: unable to extend temp segment by 128 in tablespace TEMP > > This is expected & good. > > However, using cx_Oracle, specifically using > > cursor.execute(same_statement) > > would result in the same amount of work being done, and at some point the > CPU utilization on the server stopped -- which meant ORA-01652 has happened > -- but the cursor.execute(...) call stays blocked without raising an > exception. This makes the app stay in a stuck state. At that point it > doesn't respond to Ctrl-C SIGINT. > > I've tried export DPI_DEBUG_LEVEL=64 and there are no messages being > printed. > > What's wrong? Is it possible to enable an exception to be raised? > > Server: 19c [where sqlplus was run] > cx_Oracle: 8.1 [different host from the server; using same DSN as sqlplus] > > Thanks. > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Suraj S. <sur...@or...> - 2021-05-03 16:49:57
|
Hey, How does the client stack trace look when the server CPU usage stops? Thanks suraj |
From: ConcreteVitamin <con...@gm...> - 2021-05-02 05:46:04
|
Hi there, I've a weird statement that's pretty expensive. Entering this SQL statement in sqlplus eventually leads to this error: ERROR at line 1: ORA-01652: unable to extend temp segment by 128 in tablespace TEMP This is expected & good. However, using cx_Oracle, specifically using cursor.execute(same_statement) would result in the same amount of work being done, and at some point the CPU utilization on the server stopped -- which meant ORA-01652 has happened -- but the cursor.execute(...) call stays blocked without raising an exception. This makes the app stay in a stuck state. At that point it doesn't respond to Ctrl-C SIGINT. I've tried export DPI_DEBUG_LEVEL=64 and there are no messages being printed. What's wrong? Is it possible to enable an exception to be raised? Server: 19c [where sqlplus was run] cx_Oracle: 8.1 [different host from the server; using same DSN as sqlplus] Thanks. |
From: ConcreteVitamin <con...@gm...> - 2021-04-22 22:45:11
|
Hi, I'm using the following script, modified from samples/CallTimeout.py (changing into cx_Oracle.connect(mode=cx_Oracle.SYSDBA) & using a 500ms timeout), and *callTimeout is not taking effects*: import cx_Oracle print(cx_Oracle.version, cx_Oracle.clientversion()) connection = cx_Oracle.connect(mode=cx_Oracle.SYSDBA) connection.callTimeout = 500 print("Call timeout set at", connection.callTimeout, "milliseconds...") cursor = connection.cursor() cursor.execute("select sysdate from dual") today, = cursor.fetchone() print("Fetch of current date before timeout:", today) # dbms_session.sleep() replaces dbms_lock.sleep() from Oracle Database 18c sleep_proc_name = "dbms_session.sleep" \ if int(connection.version.split(".")[0]) >= 18 \ else "dbms_lock.sleep" print("Sleeping...should time out...") try: cursor.callproc(sleep_proc_name, (3,)) except cx_Oracle.DatabaseError as e: print("ERROR:", e) cursor.execute("select sysdate from dual") today, = cursor.fetchone() print("Fetch of current date after timeout:", today) The output is: $ python test.py 8.1.0 (18, 3, 0, 0, 0) Call timeout set at 500 milliseconds... Fetch of current date before timeout: 2021-04-22 22:39:30 Sleeping...should time out... Fetch of current date after timeout: 2021-04-22 22:39:33 Note that (from the output), I'm using *cx_Oracle 8.1 and Oracle client library 18.3* --- both satisfy this feature's requirements. The DB is freshly installed on an Oracle Linux box. Is there a pointer on how to resolve this? *Is it possible something about connect(mode=cx_Oracle.SYSDBA) made the timeout a no-op? *Or, should I upgrade to Oracle 19 and retry? Thanks. |
From: Giuseppe D. <giu...@gm...> - 2021-02-24 09:12:42
|
Hi Anthony. Thanks for your support. I will wait until you upload an example of binary file loading using SODA. Regards. Giuseppe. Il giorno mar 23 feb 2021 alle ore 16:57 Anthony Tuininga < ant...@gm...> ha scritto: > Yes, it is possible to load binary files like PDF, doc, etc. into a > collection. I can add a sample into the samples directory when I get a > moment. I'm not sure about textual search. I'll ask internally and get back > to you. > > Anthony > > On Tue, Feb 23, 2021 at 3:29 AM Giuseppe Difalco <giu...@gm...> > wrote: > >> Hi all, >> I want to kindly ask you if is possible to load binary file like PDF, >> doc, ... into a collection using SODA features. >> If yes, please, can you provide an example?In addtion, is it possible to >> execute textual search on these binary files using SEARCH INDEX? >> >> Thanks in advance. >> >> Reagards. >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Anthony T. <ant...@gm...> - 2021-02-23 15:56:58
|
Yes, it is possible to load binary files like PDF, doc, etc. into a collection. I can add a sample into the samples directory when I get a moment. I'm not sure about textual search. I'll ask internally and get back to you. Anthony On Tue, Feb 23, 2021 at 3:29 AM Giuseppe Difalco <giu...@gm...> wrote: > Hi all, > I want to kindly ask you if is possible to load binary file like PDF, doc, > ... into a collection using SODA features. > If yes, please, can you provide an example?In addtion, is it possible to > execute textual search on these binary files using SEARCH INDEX? > > Thanks in advance. > > Reagards. > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Giuseppe D. <giu...@gm...> - 2021-02-23 11:40:12
|
Hi Christopher. Thank you for feedback. I opened an Issue as per your suggestion ( https://github.com/oracle/python-cx_Oracle/issues/542). Regards. Giuseppe. Il giorno mar 23 feb 2021 alle ore 12:14 Christopher Jones < chr...@or...> ha scritto: > > On 23/2/21 9:26 pm, Giuseppe Difalco wrote: > > Hi all, > I want to kindly ask you if is possible to load binary file like PDF, doc, > ... into a collection using SODA features. > If yes, please, can you provide an example?In addtion, is it possible to > execute textual search on these binary files using SEARCH INDEX? > > Thanks in advance. > > Reagards. > > > It's possible to store binary data. From [1]: > > Documents are generally JSON data but they can be any data at all > (including video, images, sounds, or other binary content). > > If you open an issue on GitHub [2], I will tag the SODA expert who should > be able to point you at the best metadata to use when creating your > collection, and who can comment on searching. Please include the Oracle DB > and Oracle Client library versions. > > Chris > > [1] https://cx-oracle.readthedocs.io/en/latest/user_guide/soda.html > > [2] https://github.com/oracle/python-cx_Oracle/issues > > -- > > https://twitter.com/ghrd > > |
From: Christopher J. <chr...@or...> - 2021-02-23 11:14:21
|
On 23/2/21 9:26 pm, Giuseppe Difalco wrote: > Hi all, > I want to kindly ask you if is possible to load binary file like PDF, doc, ... into a collection using SODA features. > If yes, please, can you provide an example?In addtion, is it possible to execute textual search on these binary files using SEARCH INDEX? > > Thanks in advance. > > Reagards. It's possible to store binary data. From [1]: Documents are generally JSON data but they can be any data at all (including video, images, sounds, or other binary content). If you open an issue on GitHub [2], I will tag the SODA expert who should be able to point you at the best metadata to use when creating your collection, and who can comment on searching. Please include the Oracle DB and Oracle Client library versions. Chris [1] https://cx-oracle.readthedocs.io/en/latest/user_guide/soda.html [2] https://github.com/oracle/python-cx_Oracle/issues -- https://twitter.com/ghrd |
From: Giuseppe D. <giu...@gm...> - 2021-02-23 10:26:37
|
Hi all, I want to kindly ask you if is possible to load binary file like PDF, doc, ... into a collection using SODA features. If yes, please, can you provide an example?In addtion, is it possible to execute textual search on these binary files using SEARCH INDEX? Thanks in advance. Reagards. |
From: Anthony T. <ant...@gm...> - 2020-12-08 22:19:33
|
Thanks, Andreas! The same to you and your family! On Tue, Dec 8, 2020 at 3:06 PM Andreas Mock <and...@we...> wrote: > Unbelievable work since decades…great work, Anthony. > > > > Thank you and keep healthy. > > > > Regards > > Andreas > > > > *Von:* Anthony Tuininga <ant...@gm...> > *Gesendet:* Dienstag, 8. Dezember 2020 22:53 > *An:* cx-...@li...; DB...@py...; > pyt...@py... > *Betreff:* [cx-oracle-users] cx_Oracle 8.1 > > > > What is cx_Oracle? > > cx_Oracle is a Python extension module that enables access to Oracle > Database for Python and conforms to the Python database API 2.0 > specifications with a number of enhancements. > > > Where do I get it? > https://oracle.github.io/python-cx_Oracle > > The easiest method to install/upgrade cx_Oracle is via pip as in > > python -m pip install cx_Oracle --upgrade > > > What's new? > > See the full release notes for all of the details: > https://cx-oracle.readthedocs.io/en/latest/release_notes.html#version-8-1-december-2020 > > Please provide any feedback via GitHub issues ( > https://github.com/oracle/python-cx_Oracle/issues). > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Andreas M. <and...@we...> - 2020-12-08 22:06:27
|
Unbelievable work since decades…great work, Anthony. Thank you and keep healthy. Regards Andreas Von: Anthony Tuininga <ant...@gm...> Gesendet: Dienstag, 8. Dezember 2020 22:53 An: cx-...@li...; DB...@py...; pyt...@py... Betreff: [cx-oracle-users] cx_Oracle 8.1 What is cx_Oracle? cx_Oracle is a Python extension module that enables access to Oracle Database for Python and conforms to the Python database API 2.0 specifications with a number of enhancements. Where do I get it? https://oracle.github.io/python- <https://oracle.github.io/python-cx_Oracle> cx_Oracle The easiest method to install/upgrade cx_Oracle is via pip as in python -m pip install cx_Oracle --upgrade What's new? See the full release notes for all of the details: https://cx-oracle.readthedocs.io/en/latest/release_notes.html#version-8-1-december-2020 Please provide any feedback via GitHub issues (https://github.com/oracle/python- <https://github.com/oracle/python-cx_Oracle/issues> cx_Oracle/issues). |
From: Anthony T. <ant...@gm...> - 2020-12-08 21:53:31
|
What is cx_Oracle? cx_Oracle is a Python extension module that enables access to Oracle Database for Python and conforms to the Python database API 2.0 specifications with a number of enhancements. Where do I get it? https://oracle.github.io/python-cx_Oracle The easiest method to install/upgrade cx_Oracle is via pip as in python -m pip install cx_Oracle --upgrade What's new? See the full release notes for all of the details: https://cx-oracle.readthedocs.io/en/latest/release_notes.html#version-8-1-december-2020 Please provide any feedback via GitHub issues ( https://github.com/oracle/python-cx_Oracle/issues). |
From: Anthony T. <ant...@gm...> - 2020-09-01 03:47:29
|
What is cx_Oracle? cx_Oracle is a Python extension module that enables access to Oracle Database for Python and conforms to the Python database API 2.0 specifications with a number of enhancements. Where do I get it? https://oracle.github.io/python-cx_Oracle The easiest method to install/upgrade cx_Oracle is via pip as in python -m pip install cx_Oracle --upgrade What's new? See the full release notes for all of the details: https://cx-oracle.readthedocs.io/en/latest/release_notes.html#version-8-0-1-august-2020 Please provide any feedback via GitHub issues ( https://github.com/oracle/python-cx_Oracle/issues). |
From: Anthony T. <ant...@gm...> - 2020-07-09 19:34:27
|
Yes, that makes sense. You are informing cx_Oracle that you are binding a (temporary) BLOB -- which eliminates the error you were getting. Glad you got it worked out! On Mon, Jul 6, 2020 at 11:40 AM John Cartwright - NOAA Federal via cx-oracle-users <cx-...@li...> wrote: > Thanks for your reply Anthony. I seem to have found a workaround by using > "cursor.setinputsizes()" but I don't completely understand how that works. > See code snippet below and note that I changed to using the WKB in the > SDO_Geometry constructor rather than the SDO_UTIL.FROM_WKBGEOMETRY > utility. Does what I'm doing seem reasonable to you? > > feature = data['features'][0] > geom = arcgis.geometry.Geometry(feature['geometry']) > wkb = geom.WKB > objectid = get_next_objectid() > cursor.setinputsizes(wkb=cx_Oracle.BLOB) > cursor.execute("""insert into SURVEY(OBJECTID,SURVEY,SHAPE) values > (:objectid, :survey, MDSYS.SDO_GEOMETRY(:wkb, 8265))""", > objectid=objectid, survey='H13195', wkb=wkb) > > On Fri, Jul 3, 2020 at 9:20 AM Anthony Tuininga < > ant...@gm...> wrote: > >> At a guess: you're trying to build an object which makes use of PL/SQL. >> PL/SQL doesn't allow strings longer than 32,767 bytes to be used. So you >> have two possibilities: >> >> (1) convert :wkb into a temporary CLOB and bind that instead of the string >> (2) make the entire statement an anonymous PL/SQL block which will cause >> cx_Oracle to turn :wkb into a temporary CLOB internally >> >> If neither of those suggestions work for you, let me suggest that you >> post an issue here: https://github.com/oracle/python-cx_Oracle/issues >> with a standalone test case that demonstrates the issue. I can then look >> into it in more detail. >> >> Anthony >> >> On Tue, Jun 30, 2020 at 7:04 PM John Cartwright - NOAA Federal via >> cx-oracle-users <cx-...@li...> wrote: >> >>> Hello All, >>> >>> I have a WKB that I'm trying to insert into a SDO_GEOMETRY column. >>> Something like this: >>> >>> cursor.execute(""" >>> insert into SURVEY(OBJECTID,SURVEY,SHAPE) >>> values (:objectid, :survey, SDO_UTIL.FROM_WKBGEOMETRY(:wkb))""", >>> objectid=objectid, survey='H13195', wkb=wkb >>> ) >>> >>> However, I keep getting the error: >>> >>> cx_Oracle.DatabaseError: ORA-01461: can bind a LONG value only for >>> insert into a LONG column >>> >>> >>> Can someone please point me in the right direction? >>> >>> Thanks! >>> >>> --john >>> >>> _______________________________________________ >>> cx-oracle-users mailing list >>> cx-...@li... >>> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >>> >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: John C. - N. F. <joh...@no...> - 2020-07-06 17:40:02
|
Thanks for your reply Anthony. I seem to have found a workaround by using "cursor.setinputsizes()" but I don't completely understand how that works. See code snippet below and note that I changed to using the WKB in the SDO_Geometry constructor rather than the SDO_UTIL.FROM_WKBGEOMETRY utility. Does what I'm doing seem reasonable to you? feature = data['features'][0] geom = arcgis.geometry.Geometry(feature['geometry']) wkb = geom.WKB objectid = get_next_objectid() cursor.setinputsizes(wkb=cx_Oracle.BLOB) cursor.execute("""insert into SURVEY(OBJECTID,SURVEY,SHAPE) values (:objectid, :survey, MDSYS.SDO_GEOMETRY(:wkb, 8265))""", objectid=objectid, survey='H13195', wkb=wkb) On Fri, Jul 3, 2020 at 9:20 AM Anthony Tuininga <ant...@gm...> wrote: > At a guess: you're trying to build an object which makes use of PL/SQL. > PL/SQL doesn't allow strings longer than 32,767 bytes to be used. So you > have two possibilities: > > (1) convert :wkb into a temporary CLOB and bind that instead of the string > (2) make the entire statement an anonymous PL/SQL block which will cause > cx_Oracle to turn :wkb into a temporary CLOB internally > > If neither of those suggestions work for you, let me suggest that you post > an issue here: https://github.com/oracle/python-cx_Oracle/issues with a > standalone test case that demonstrates the issue. I can then look into it > in more detail. > > Anthony > > On Tue, Jun 30, 2020 at 7:04 PM John Cartwright - NOAA Federal via > cx-oracle-users <cx-...@li...> wrote: > >> Hello All, >> >> I have a WKB that I'm trying to insert into a SDO_GEOMETRY column. >> Something like this: >> >> cursor.execute(""" >> insert into SURVEY(OBJECTID,SURVEY,SHAPE) >> values (:objectid, :survey, SDO_UTIL.FROM_WKBGEOMETRY(:wkb))""", >> objectid=objectid, survey='H13195', wkb=wkb >> ) >> >> However, I keep getting the error: >> >> cx_Oracle.DatabaseError: ORA-01461: can bind a LONG value only for insert >> into a LONG column >> >> >> Can someone please point me in the right direction? >> >> Thanks! >> >> --john >> >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Anthony T. <ant...@gm...> - 2020-07-03 15:19:25
|
At a guess: you're trying to build an object which makes use of PL/SQL. PL/SQL doesn't allow strings longer than 32,767 bytes to be used. So you have two possibilities: (1) convert :wkb into a temporary CLOB and bind that instead of the string (2) make the entire statement an anonymous PL/SQL block which will cause cx_Oracle to turn :wkb into a temporary CLOB internally If neither of those suggestions work for you, let me suggest that you post an issue here: https://github.com/oracle/python-cx_Oracle/issues with a standalone test case that demonstrates the issue. I can then look into it in more detail. Anthony On Tue, Jun 30, 2020 at 7:04 PM John Cartwright - NOAA Federal via cx-oracle-users <cx-...@li...> wrote: > Hello All, > > I have a WKB that I'm trying to insert into a SDO_GEOMETRY column. > Something like this: > > cursor.execute(""" > insert into SURVEY(OBJECTID,SURVEY,SHAPE) > values (:objectid, :survey, SDO_UTIL.FROM_WKBGEOMETRY(:wkb))""", > objectid=objectid, survey='H13195', wkb=wkb > ) > > However, I keep getting the error: > > cx_Oracle.DatabaseError: ORA-01461: can bind a LONG value only for insert > into a LONG column > > > Can someone please point me in the right direction? > > Thanks! > > --john > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: John C. - N. F. <joh...@no...> - 2020-07-01 01:03:46
|
Hello All, I have a WKB that I'm trying to insert into a SDO_GEOMETRY column. Something like this: cursor.execute(""" insert into SURVEY(OBJECTID,SURVEY,SHAPE) values (:objectid, :survey, SDO_UTIL.FROM_WKBGEOMETRY(:wkb))""", objectid=objectid, survey='H13195', wkb=wkb ) However, I keep getting the error: cx_Oracle.DatabaseError: ORA-01461: can bind a LONG value only for insert into a LONG column Can someone please point me in the right direction? Thanks! --john |
From: Anthony T. <ant...@gm...> - 2020-06-26 17:16:12
|
What is cx_Oracle? cx_Oracle is a Python extension module that enables access to Oracle Database for Python and conforms to the Python database API 2.0 specifications with a number of enhancements. Where do I get it? https://oracle.github.io/python-cx_Oracle The easiest method to install/upgrade cx_Oracle is via pip as in python -m pip install cx_Oracle --upgrade What's new? See the full release notes for all of the details: https://cx-oracle.readthedocs.io/en/latest/release_notes.html#version-8-0-june-2020 Please provide any feedback via GitHub issues ( https://github.com/oracle/python-cx_Oracle/issues). |