cx-oracle-users Mailing List for cx_Oracle (Page 13)
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: Shai B. <sh...@pl...> - 2015-10-21 21:45:34
|
On Thursday 22 October 2015 00:39:34 Chris Gould wrote: > You shouldn't need ORACLE_HOME (Oracle actually discourage setting that > with Instantclient). > But your DYLD_LIBRARY_PATH should point to the actual top-level directory > of your instantclient (ie ending with /instantclient_11_2 in your example). > > Also you need to create a symlink in the instantclient_11_2 directory for > libclntsh.dylib.11.1 (or equivalent) > If you look at his list of commands, he moved everything out of the instantclient_11_2 directory, and removed it. |
From: Chris G. <chr...@to...> - 2015-10-21 21:40:00
|
You shouldn't need ORACLE_HOME (Oracle actually discourage setting that with Instantclient). But your DYLD_LIBRARY_PATH should point to the actual top-level directory of your instantclient (ie ending with /instantclient_11_2 in your example). Also you need to create a symlink in the instantclient_11_2 directory for libclntsh.dylib.11.1 (or equivalent) ln -s libclntsh.dylib.11.1 libclntsh.dylib On 21 October 2015 at 18:48, Shai Berger <sh...@pl...> wrote: > Hi Greg, > > It seems to me like your "pip install" command is picking some previously > installed cx-oracle on your system, rather than building a new one. That is > probably why you're getting cx-oracle 5.2 and not the latest version, and > that > is why your installation output does not seem to include compilation. > > HTH, > Shai. > > > ------------------------------------------------------------------------------ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Christopher J. <chr...@or...> - 2015-10-21 20:40:03
|
On 14/10/2015 11:32 pm, Os, Roel van (Justid) wrote: > Hello list, > > We've run into an issue with inserting CLOB values in to a table. When we insert a large number of values into a table with a column with type CLOB, the temp tablespace usage in Oracle keeps increasing. After a large number of inserts are performed, Oracle refuses to insert more data, returning a ORA-01652 error ("unable to extend temp segment"). After our script is terminated, the temp tablespace is empty again. > > The following fragment demonstrates our usage pattern (the for loop is for testing and is not present in our actual code): > > for i in range(count): > conn = sessionpool.acquire() > cur = conn.cursor() > sql_i = 'INSERT INTO SHELVE_TEST("DICTIONARY", "KEY", "VALUE") VALUES (:d, :k, :v)' > cur.prepare(sql_i) > # The following line seems to cause temp tablespace usage to grow: > cur.setinputsizes(v=cx_Oracle.CLOB) > > cur.execute(None, { > 'd': 'TestDict', > 'k': 'Key %s' % i, > 'v': ('Value %s' % i)# * 10 * 1000 * i > }) > conn.commit() > cur.close() > sessionpool.release(conn) > > When we remove the line "cur.setinputsizes(v=cx_Oracle.CLOB)", the temp tablespace usage stays at zero. We examined the temp tablespace usage with the following SQL query: > SELECT * FROM V$TEMPSEG_USAGE; > > This shows an entry with SEGTYPE 'LOB_DATA', where the BLOCKS column keeps increasing. When the script is terminated, the temp tablespace usage is freed again. > > I've attached a simple test script. > > Versions: > * cx_Oracle: 5.2 (also tested with 5.1.1) > * oracle-instantclient12.1-basiclite 12.1.0.2.0-2 > * Oracle XE 11.2.0 running on CentOS, also tested on RHEL > > Can any of you shed any light on what's happening here? Is there something we need to be doing to clean up the temp tablespace usage after inserting? > > Regards, > Roel van Os > ________________________________ > > Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het elektronisch verzenden van berichten. > > Ministerie van Veiligheid en Justitie > > This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages. > > Ministry of Security and Justice > > > > ------------------------------------------------------------------------------ > > > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > Can you log an issue at https://bitbucket.org/anthony_tuininga/cx_oracle/issues ? It smells like a Temporary Lob leak. Chris -- http://twitter.com/ghrd |
From: Shai B. <sh...@pl...> - 2015-10-21 17:48:53
|
Hi Greg, It seems to me like your "pip install" command is picking some previously installed cx-oracle on your system, rather than building a new one. That is probably why you're getting cx-oracle 5.2 and not the latest version, and that is why your installation output does not seem to include compilation. HTH, Shai. |
From: Os, R v. (Justid) <R....@ju...> - 2015-10-21 14:56:24
|
Hello Chris, Thanks for your response. After searching some more, I found a number of web pages that support this, e.g. http://blackh0le.usachev.pro/~usd/tmp/MOS_Notes/How%20to%20Release%20the%20Temp%20LOB%20Space%20and%20Avoid%20Hitting%20ORA-1652%20%5BID%20802897.1%5D.html We’re currently working around it by using LONG_STRING instead of CLOB when writing the value: cur.setinputsizes(v=cx_Oracle.LONG_STRING) Our value sizes never exceed a few hundreds of kilobytes. I’ve tested with values of several megabytes and this seems to work fine. Thanks again, Roel Van: Chris Gould [mailto:chr...@to...] Verzonden: woensdag 14 oktober 2015 15:23 Aan: cx-...@li... Onderwerp: Re: [cx-oracle-users] Inserting CLOBs: temp tablespace usage keeps increasing That's an Oracle bug, not a problem with cx_Oracle or Python. I've experienced it myself. The way I got round it at the time was to disconnect and reconnect after every 100 or so rows inserted. Chris On 14 October 2015 at 13:32, Os, Roel van (Justid) <R....@ju...<mailto:R....@ju...>> wrote: Hello list, We've run into an issue with inserting CLOB values in to a table. When we insert a large number of values into a table with a column with type CLOB, the temp tablespace usage in Oracle keeps increasing. After a large number of inserts are performed, Oracle refuses to insert more data, returning a ORA-01652 error ("unable to extend temp segment"). After our script is terminated, the temp tablespace is empty again. The following fragment demonstrates our usage pattern (the for loop is for testing and is not present in our actual code): for i in range(count): conn = sessionpool.acquire() cur = conn.cursor() sql_i = 'INSERT INTO SHELVE_TEST("DICTIONARY", "KEY", "VALUE") VALUES (:d, :k, :v)' cur.prepare(sql_i) # The following line seems to cause temp tablespace usage to grow: cur.setinputsizes(v=cx_Oracle.CLOB) cur.execute(None, { 'd': 'TestDict', 'k': 'Key %s' % i, 'v': ('Value %s' % i)# * 10 * 1000 * i }) conn.commit() cur.close() sessionpool.release(conn) When we remove the line "cur.setinputsizes(v=cx_Oracle.CLOB)", the temp tablespace usage stays at zero. We examined the temp tablespace usage with the following SQL query: SELECT * FROM V$TEMPSEG_USAGE; This shows an entry with SEGTYPE 'LOB_DATA', where the BLOCKS column keeps increasing. When the script is terminated, the temp tablespace usage is freed again. I've attached a simple test script. Versions: * cx_Oracle: 5.2 (also tested with 5.1.1) * oracle-instantclient12.1-basiclite 12.1.0.2.0-2 * Oracle XE 11.2.0 running on CentOS, also tested on RHEL Can any of you shed any light on what's happening here? Is there something we need to be doing to clean up the temp tablespace usage after inserting? Regards, Roel van Os ________________________________ Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het elektronisch verzenden van berichten. Ministerie van Veiligheid en Justitie This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages. Ministry of Security and Justice ------------------------------------------------------------------------------ _______________________________________________ cx-oracle-users mailing list cx-...@li...<mailto:cx-...@li...> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users ________________________________ Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het elektronisch verzenden van berichten. Ministerie van Veiligheid en Justitie This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages. Ministry of Security and Justice |
From: greg <mar...@gm...> - 2015-10-21 14:43:16
|
Thanks. I just tried all of your advice and it didn't help. I'm still getting the same error. Is there anything I should check. Anything with the libclntsh.dylib.10.1? Maybe I'm missing a prerequisite? -Greg On Wed, Oct 21, 2015 at 10:04 AM, Kubo Takehiro <ku...@ji...> wrote: > On Wed, Oct 21, 2015 at 9:51 PM, greg <mar...@gm...> wrote: >> ImportError: >> dlopen(/Users/me/sx_direct_env/lib/python2.7/site-packages/cx_Oracle.so, >> 2): Library not loaded: /b/227/rdbms/lib/libclntsh.dylib.10.1 >> Referenced from: >> /Users/me/sx_direct_env/lib/python2.7/site-packages/cx_Oracle.so >> Reason: image not found > > The cx_Oracle.so is linked with Oracle 10g instant client because it depends > on libclntsh.dylib.10.1. > >> $ export ORACLE_HOME=$PWD >> $ export DYLD_LIBRARY_PATH=$ORACLE_HOME >> $ export LD_LIBRARY_PATH=$ORACLE_HOME >> $ export PATH=$PATH:$ORACLE_HOME > > IMO, Oracle 10g client is in the $PATH before $ORACLE_HOME. > Could you swap the order as follows? > > $ export PATH=$ORACLE_HOME:$PATH > >> $ ruby -a fix_oralib.rb >> adrci: >> add rpath: @loader_path >> change install name >> from: /ade/b/3071542110/oracle/rdbms/lib/libclntsh.dylib.11.1 >> to: @rpath/libclntsh.dylib.11.1 > > It uses relative path. Use -a option or --absolute-path option after > fix_oralib.rb as follows. > > $ ruby fix_oralib.rb -a > > And then uninstall cx_oracle and reinstall it. > > $ pip uninstall cx_oracle > $ pip install cx_oracle > > ------------------------------------------------------------------------------ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Kubo T. <ku...@ji...> - 2015-10-21 14:04:42
|
On Wed, Oct 21, 2015 at 9:51 PM, greg <mar...@gm...> wrote: > ImportError: > dlopen(/Users/me/sx_direct_env/lib/python2.7/site-packages/cx_Oracle.so, > 2): Library not loaded: /b/227/rdbms/lib/libclntsh.dylib.10.1 > Referenced from: > /Users/me/sx_direct_env/lib/python2.7/site-packages/cx_Oracle.so > Reason: image not found The cx_Oracle.so is linked with Oracle 10g instant client because it depends on libclntsh.dylib.10.1. > $ export ORACLE_HOME=$PWD > $ export DYLD_LIBRARY_PATH=$ORACLE_HOME > $ export LD_LIBRARY_PATH=$ORACLE_HOME > $ export PATH=$PATH:$ORACLE_HOME IMO, Oracle 10g client is in the $PATH before $ORACLE_HOME. Could you swap the order as follows? $ export PATH=$ORACLE_HOME:$PATH > $ ruby -a fix_oralib.rb > adrci: > add rpath: @loader_path > change install name > from: /ade/b/3071542110/oracle/rdbms/lib/libclntsh.dylib.11.1 > to: @rpath/libclntsh.dylib.11.1 It uses relative path. Use -a option or --absolute-path option after fix_oralib.rb as follows. $ ruby fix_oralib.rb -a And then uninstall cx_oracle and reinstall it. $ pip uninstall cx_oracle $ pip install cx_oracle |
From: greg <mar...@gm...> - 2015-10-21 12:51:18
|
(I actually asked on StackOverflow here: http://stackoverflow.com/questions/33259671/how-to-install-cx-oracle-on-el-capitan but then I realized you guys might be better to ask) I found this other thread, and a blog that sort of explains the problems and what to do but for some reason it's still not working for me: http://sourceforge.net/p/cx-oracle/mailman/message/34534872/, http://stefanoapostolico.com/2015/10/08/install_cx_oracle_with_sip_enabled.html Putting all that info together, here was my best shot at installing it to my virtualenv but alas, still no good. The error I'm getting is: Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: dlopen(/Users/me/sx_direct_env/lib/python2.7/site-packages/cx_Oracle.so, 2): Library not loaded: /b/227/rdbms/lib/libclntsh.dylib.10.1 Referenced from: /Users/me/sx_direct_env/lib/python2.7/site-packages/cx_Oracle.so Reason: image not found Any tips would be really appreciated! I'm stuck on this. Here are all of my install steps: $ cd /Users/me/sx_direct_env/lib/python2.7 $ mkdir oracle $ cd oracle $ export ORACLE_HOME=$PWD $ export DYLD_LIBRARY_PATH=$ORACLE_HOME $ export LD_LIBRARY_PATH=$ORACLE_HOME $ export PATH=$PATH:$ORACLE_HOME $ unzip ~/Downloads/instantclient-basic-macos.x64-11.2.0.4.0.zip $ unzip ~/Downloads/instantclient-sdk-macos.x64-11.2.0.4.0.zip $ mv instantclient_11_2/* . $ rmdir instantclient_11_2 $ curl -O https://raw.githubusercontent.com/kubo/fix_oralib_osx/master/fix_oralib.rb $ ruby -a fix_oralib.rb adrci: add rpath: @loader_path change install name from: /ade/b/3071542110/oracle/rdbms/lib/libclntsh.dylib.11.1 to: @rpath/libclntsh.dylib.11.1 change install name from: /ade/dosulliv_ldapmac/oracle/ldap/lib/libnnz11.dylib to: @rpath/libnnz11.dylib genezi: add rpath: @loader_path change install name from: /ade/b/3071542110/oracle/rdbms/lib/libclntsh.dylib.11.1 to: @rpath/libclntsh.dylib.11.1 libclntsh.dylib.11.1: add rpath: @loader_path change identification name from: /ade/b/3071542110/oracle/rdbms/lib/libclntsh.dylib.11.1 to: @rpath/libclntsh.dylib.11.1 change install name from: /ade/dosulliv_ldapmac/oracle/ldap/lib/libnnz11.dylib to: @rpath/libnnz11.dylib libnnz11.dylib: change identification name from: /ade/dosulliv_ldapmac/oracle/ldap/lib/libnnz11.dylib to: @rpath/libnnz11.dylib libocci.dylib.11.1: change identification name from: /ade/b/3071542110/oracle/rdbms/lib/libocci.dylib.11.1 to: @rpath/libocci.dylib.11.1 libociei.dylib: add rpath: @loader_path change install name from: /ade/b/3071542110/oracle/rdbms/lib/libclntsh.dylib.11.1 to: @rpath/libclntsh.dylib.11.1 libocijdbc11.dylib: add rpath: @loader_path change install name from: /ade/b/2475221476/oracle/rdbms/lib/libclntsh.dylib.11.1 to: @rpath/libclntsh.dylib.11.1 change install name from: /ade/b/2475221476/oracle/ldap/lib/libnnz11.dylib to: @rpath/libnnz11.dylib uidrvci: add rpath: @loader_path change install name from: /ade/b/3071542110/oracle/rdbms/lib/libclntsh.dylib.11.1 to: @rpath/libclntsh.dylib.11.1 change install name from: /ade/dosulliv_ldapmac/oracle/ldap/lib/libnnz11.dylib to: @rpath/libnnz11.dylib $ pip install cx_oracle Collecting cx-oracle Installing collected packages: cx-oracle Successfully installed cx-oracle-5.2 $ python -c "import cx_Oracle" Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: dlopen(/Users/me/sx_direct_env/lib/python2.7/site-packages/cx_Oracle.so, 2): Library not loaded: /b/227/rdbms/lib/libclntsh.dylib.10.1 Referenced from: /Users/me/sx_direct_env/lib/python2.7/site-packages/cx_Oracle.so Reason: image not found |
From: Chris G. <chr...@to...> - 2015-10-14 13:23:40
|
That's an Oracle bug, not a problem with cx_Oracle or Python. I've experienced it myself. The way I got round it at the time was to disconnect and reconnect after every 100 or so rows inserted. Chris On 14 October 2015 at 13:32, Os, Roel van (Justid) <R....@ju...> wrote: > Hello list, > > We've run into an issue with inserting CLOB values in to a table. When we > insert a large number of values into a table with a column with type CLOB, > the temp tablespace usage in Oracle keeps increasing. After a large number > of inserts are performed, Oracle refuses to insert more data, returning a > ORA-01652 error ("unable to extend temp segment"). After our script is > terminated, the temp tablespace is empty again. > > The following fragment demonstrates our usage pattern (the for loop is for > testing and is not present in our actual code): > > for i in range(count): > conn = sessionpool.acquire() > cur = conn.cursor() > sql_i = 'INSERT INTO SHELVE_TEST("DICTIONARY", "KEY", "VALUE") > VALUES (:d, :k, :v)' > cur.prepare(sql_i) > # The following line seems to cause temp tablespace usage to grow: > cur.setinputsizes(v=cx_Oracle.CLOB) > > cur.execute(None, { > 'd': 'TestDict', > 'k': 'Key %s' % i, > 'v': ('Value %s' % i)# * 10 * 1000 * i > }) > conn.commit() > cur.close() > sessionpool.release(conn) > > When we remove the line "cur.setinputsizes(v=cx_Oracle.CLOB)", the temp > tablespace usage stays at zero. We examined the temp tablespace usage with > the following SQL query: > SELECT * FROM V$TEMPSEG_USAGE; > > This shows an entry with SEGTYPE 'LOB_DATA', where the BLOCKS column keeps > increasing. When the script is terminated, the temp tablespace usage is > freed again. > > I've attached a simple test script. > > Versions: > * cx_Oracle: 5.2 (also tested with 5.1.1) > * oracle-instantclient12.1-basiclite 12.1.0.2.0-2 > * Oracle XE 11.2.0 running on CentOS, also tested on RHEL > > Can any of you shed any light on what's happening here? Is there something > we need to be doing to clean up the temp tablespace usage after inserting? > > Regards, > Roel van Os > ________________________________ > > Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u > niet de geadresseerde bent of dit bericht abusievelijk aan u is > toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht > te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van > welke aard ook, die verband houdt met risico's verbonden aan het > elektronisch verzenden van berichten. > > Ministerie van Veiligheid en Justitie > > This message may contain information that is not intended for you. If you > are not the addressee or if this message was sent to you by mistake, you > are requested to inform the sender and delete the message. The State > accepts no liability for damage of any kind resulting from the risks > inherent in the electronic transmission of messages. > > Ministry of Security and Justice > > > > ------------------------------------------------------------------------------ > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Os, R. v. (Justid) <R....@ju...> - 2015-10-14 13:08:22
|
Hello list, We've run into an issue with inserting CLOB values in to a table. When we insert a large number of values into a table with a column with type CLOB, the temp tablespace usage in Oracle keeps increasing. After a large number of inserts are performed, Oracle refuses to insert more data, returning a ORA-01652 error ("unable to extend temp segment"). After our script is terminated, the temp tablespace is empty again. The following fragment demonstrates our usage pattern (the for loop is for testing and is not present in our actual code): for i in range(count): conn = sessionpool.acquire() cur = conn.cursor() sql_i = 'INSERT INTO SHELVE_TEST("DICTIONARY", "KEY", "VALUE") VALUES (:d, :k, :v)' cur.prepare(sql_i) # The following line seems to cause temp tablespace usage to grow: cur.setinputsizes(v=cx_Oracle.CLOB) cur.execute(None, { 'd': 'TestDict', 'k': 'Key %s' % i, 'v': ('Value %s' % i)# * 10 * 1000 * i }) conn.commit() cur.close() sessionpool.release(conn) When we remove the line "cur.setinputsizes(v=cx_Oracle.CLOB)", the temp tablespace usage stays at zero. We examined the temp tablespace usage with the following SQL query: SELECT * FROM V$TEMPSEG_USAGE; This shows an entry with SEGTYPE 'LOB_DATA', where the BLOCKS column keeps increasing. When the script is terminated, the temp tablespace usage is freed again. I've attached a simple test script. Versions: * cx_Oracle: 5.2 (also tested with 5.1.1) * oracle-instantclient12.1-basiclite 12.1.0.2.0-2 * Oracle XE 11.2.0 running on CentOS, also tested on RHEL Can any of you shed any light on what's happening here? Is there something we need to be doing to clean up the temp tablespace usage after inserting? Regards, Roel van Os ________________________________ Dit bericht kan informatie bevatten die niet voor u is bestemd. Indien u niet de geadresseerde bent of dit bericht abusievelijk aan u is toegezonden, wordt u verzocht dat aan de afzender te melden en het bericht te verwijderen. De Staat aanvaardt geen aansprakelijkheid voor schade, van welke aard ook, die verband houdt met risico's verbonden aan het elektronisch verzenden van berichten. Ministerie van Veiligheid en Justitie This message may contain information that is not intended for you. If you are not the addressee or if this message was sent to you by mistake, you are requested to inform the sender and delete the message. The State accepts no liability for damage of any kind resulting from the risks inherent in the electronic transmission of messages. Ministry of Security and Justice |
From: Kubo T. <ku...@ji...> - 2015-10-13 13:45:22
|
I made document to install cx_Oracle on El Capitan. https://gist.github.com/kubo/8a45c653d06040c30135 |
From: Kubo T. <ku...@ji...> - 2015-10-13 03:40:44
|
On Tue, Oct 13, 2015 at 12:33 PM, Kubo Takehiro <ku...@ji...> wrote: > ruby fix_oralib.rb --ic_dir /opt/oracle/instantclient_11_2 > /Library/Python/2.7/site-packages/cx_Oracle.so My mail client folded one line to two lines. Don't run the above two lines separately. Join them and run in a line. |
From: Kubo T. <ku...@ji...> - 2015-10-13 03:34:05
|
On 12/10/2015 10:58 pm, Dominic Giles wrote: > After upgrading to El Capitan. cx_oracle now appears to have broken. > > prior to upgrading my environment worked fine. Now I get the message indicating problems with DYLD_LIBRARY_PATH. > > python WaitTime.py > Traceback (most recent call last): > File "WaitTime.py", line 5, in <module> > import cx_Oracle > ImportError: dlopen(/Library/Python/2.7/site-packages/cx_Oracle.so, 2): Library not loaded: /ade/b/2649109290/oracle/rdbms/lib/libclntsh.dylib.11.1 > Referenced from: /Library/Python/2.7/site-packages/cx_Oracle.so > Reason: image not found If libclntsh.dylib.11.1 is in /opt/oracle/instantclient_11_2, run the following command. curl -O https://raw.githubusercontent.com/kubo/fix_oralib_osx/master/fix_oralib.rb ruby fix_oralib.rb --ic_dir /opt/oracle/instantclient_11_2 /Library/Python/2.7/site-packages/cx_Oracle.so This changs the install name in cx_Oracle.so from /ade/b/2649109290/oracle/rdbms/lib/libclntsh.dylib.11.1 to @rpath/libclntsh.dylib.11.1 and adds /opt/oracle/instantclient_11_2 as rpath to cx_Oracle.so. |
From: Kubo T. <ku...@ji...> - 2015-10-13 00:01:44
|
On Tue, Oct 13, 2015 at 8:18 AM, Christopher Jones <chr...@or...> wrote: > It's a general issue for all users of Oracle client libraries. > E.g node-oracledb also has the problem: https://github.com/oracle/node-oracledb/issues/231 ruby-oci8 also. http://www.rubydoc.info/github/kubo/ruby-oci8/file/docs/install-on-osx.md https://github.com/kubo/fix_oralib_osx "ruby fix_oralib.rb" must be run with "--absolute-path" option cx_oracle and node-oracledb because ruby-oci8 passes -Wl,-rpath,/path/to/oracle/library to cc but cx_oracle and node-oraclede don't. |
From: Christopher J. <chr...@or...> - 2015-10-12 23:17:59
|
On 12/10/2015 10:58 pm, Dominic Giles wrote: > After upgrading to El Capitan. cx_oracle now appears to have broken. > > prior to upgrading my environment worked fine. Now I get the message indicating problems with DYLD_LIBRARY_PATH. > > python WaitTime.py > Traceback (most recent call last): > File "WaitTime.py", line 5, in <module> > import cx_Oracle > ImportError: dlopen(/Library/Python/2.7/site-packages/cx_Oracle.so, 2): Library not loaded: /ade/b/2649109290/oracle/rdbms/lib/libclntsh.dylib.11.1 > Referenced from: /Library/Python/2.7/site-packages/cx_Oracle.so > Reason: image not found > > previously it worked flawlessly… Sqlplus and jdbc_oci still work. > > reinstall of cx_oracle doesn’t make any difference. Hi Dom, This is due to El Capitan's SIP. It's a general issue for all users of Oracle client libraries. E.g node-oracledb also has the problem: https://github.com/oracle/node-oracledb/issues/231 There are various scripts around that might help: https://blogs.oracle.com/opal/entry/installing_node_oracledb_on_os This may or may not have issues. I'm waiting to hear from our Apple group for their recommendations. Chris -- http://twitter.com/ghrd |
From: Dominic G. <dom...@gm...> - 2015-10-12 11:58:08
|
After upgrading to El Capitan. cx_oracle now appears to have broken. prior to upgrading my environment worked fine. Now I get the message indicating problems with DYLD_LIBRARY_PATH. python WaitTime.py Traceback (most recent call last): File "WaitTime.py", line 5, in <module> import cx_Oracle ImportError: dlopen(/Library/Python/2.7/site-packages/cx_Oracle.so, 2): Library not loaded: /ade/b/2649109290/oracle/rdbms/lib/libclntsh.dylib.11.1 Referenced from: /Library/Python/2.7/site-packages/cx_Oracle.so Reason: image not found previously it worked flawlessly… Sqlplus and jdbc_oci still work. reinstall of cx_oracle doesn’t make any difference. Sent with Unibox |
From: Shai B. <sh...@pl...> - 2015-10-06 23:11:43
|
Hi Eduardo, On Tuesday 06 October 2015 23:25:48 Eduardo Nascimento wrote: > > My question is how to do a subquery, every time is like a subquery displays > an error: > What makes you think the problem is with subqueries? > DatabaseError: ORA-00936: missing expression > > > Attached the file that I am using sql and script in python. > > > > Could help me with this issue? Try executing the queries one-by-one. Your current code tries to execute a string with several queries in it as if it were one query (and if I understand correctly, the error is caused because Oracle sees, in the first query: ... group by mc.conn_source_1 -select ... Oracle tries to parse that as an expression -- (mc.conn_source_1 - something) except that, instead of "something", it finds the reserved word "select" -- hence a missing expression. HTH, Shai. |
From: Eduardo N. <ed...@gm...> - 2015-10-06 20:25:54
|
## Performs connected query and results by sending e-mail import smtplib import cx_Oracle con = cx_Oracle.connect('edu/edu@129.129.128.129/sample') cursor = con.cursor() cursor.execute(file('C:\QUERY.sql').read()) rs = cursor.fetchall() print(rs) smtpObj = smtplib.SMTP_SSL('mail.labtec.com',465) smtpObj.ehlo() smtpObj.login('mo...@la....','xxxx') smtpObj.sendmail('mo...@la...','ed...@la...',str(rs) ) smtpObj.quit() |
From: Anthony T. <ant...@gm...> - 2015-10-03 21:03:57
|
Hi Anurag, Not sure if anyone responded to this but you do have one possibility. The value of STORE is not a string but (for example) an integer. Previous executions of this statement used a value that *was* a string. You can verify that fact by examining traceback or using print statements. You can also work around this by ensuring that the values are always the same type or by creating a new cursor. Hope that helps! Anthony On Tue, Sep 8, 2015 at 11:50 AM, Anurag Chourasia < anu...@gm...> wrote: > All, > > I am on the following cx_Oracle version > > >>> cx_Oracle.version > '5.0.3' > > Time and again I get this error in executing a query > > expecting None or a string > > The query is being executed this way > > cursor.execute("SELECT * FROM APP_STORE WHERE STORE=:STORE %s" > %(order_clause),{'STORE':STORE}) > > What could be the reason? Similar queries executed earlier in the flow > work fine but this one does not. > > Appreciate some guidance on this. > > Regards, > Anurag > > > ------------------------------------------------------------------------------ > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Anurag C. <anu...@gm...> - 2015-09-08 17:50:52
|
All, I am on the following cx_Oracle version >>> cx_Oracle.version '5.0.3' Time and again I get this error in executing a query expecting None or a string The query is being executed this way cursor.execute("SELECT * FROM APP_STORE WHERE STORE=:STORE %s" %(order_clause),{'STORE':STORE}) What could be the reason? Similar queries executed earlier in the flow work fine but this one does not. Appreciate some guidance on this. Regards, Anurag |
From: 千樱硕 <qia...@ho...> - 2015-08-18 01:32:41
|
Thank you. I check my sql (the self.__dtlSql) and i find the error. when i link str from tow row in code. i forget the blank. Date: Mon, 17 Aug 2015 14:03:35 +0800 From: sin...@gm... To: cx-...@li... Subject: Re: [cx-oracle-users] when i use sum() in my sql, my code will be ORA-00907 yes looks like the syntax err. -thanks, suse 2015-08-15 22:47 GMT+08:00 Anthony Tuininga <ant...@gm...>: Hi, It looks like the omitted code is rather important....as the last line you keep talks about __midSql but the line that actually errors talks about __dtlSql. Take a look at __dtlSql -- there will be a syntax error in your SQL there. :-) Anthony On Sat, Aug 15, 2015 at 2:00 AM, 地铁怪0 <196...@qq...> wrote: Hi all: This is my first time to use cx_Oracle, i get a problem, This is my code: --omit-- self.__midSql = "select sum(primal_fee) from ad.ca_daily_bill" self.__db = cx_Oracle.Connection(self.__user, self.__passwd, self.__dns) self.__cursor = self.__db.cursor() self.__cursor.execute(self.__midSql) --omit-- and the error: Traceback (most recent call last): File "check_daily_bill_1.4.py", line 293, in <module> query_DB.dailyQueryFromDB() File "check_daily_bill_1.4.py", line 281, in dailyQueryFromDB self.__cursor.execute(self.__dtlSql) cx_Oracle.DatabaseError: ORA-00907: missing right parenthesis Sorry for my omit , i should keep secret for my customer. The code is copy from my real code, i just change the table_name. and my table_name do not contain a "(" or ")" . I don't omit the error message. that is all. the last, sorry for my english, if you know how to deal this error, please tell me, thanks for your help! Best Wishes For You ------------------------------------------------------------------------------ _______________________________________________ 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 -- Regards, -suse ------------------------------------------------------------------------------ _______________________________________________ cx-oracle-users mailing list cx-...@li... https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Suse S. <sin...@gm...> - 2015-08-17 06:03:44
|
yes looks like the syntax err. -thanks, suse 2015-08-15 22:47 GMT+08:00 Anthony Tuininga <ant...@gm...>: > Hi, > > It looks like the omitted code is rather important....as the last line you > keep talks about __midSql but the line that actually errors talks about > __dtlSql. Take a look at __dtlSql -- there will be a syntax error in your > SQL there. :-) > > Anthony > > On Sat, Aug 15, 2015 at 2:00 AM, 地铁怪0 <196...@qq...> wrote: > >> Hi all: >> This is my first time to use cx_Oracle, i get a problem, >> >> - This is my code: >> >> --omit-- >> self.__midSql = "select sum(primal_fee) from ad.ca_daily_bill" >> self.__db = cx_Oracle.Connection(self.__user, self.__passwd, >> self.__dns) >> self.__cursor = self.__db.cursor() >> self.__cursor.execute(self.__midSql) >> --omit-- >> >> >> >> - and the error: >> >> Traceback (most recent call last): >> File "check_daily_bill_1.4.py", line 293, in <module> >> query_DB.dailyQueryFromDB() >> File "check_daily_bill_1.4.py", line 281, in dailyQueryFromDB >> self.__cursor.execute(self.__dtlSql) >> cx_Oracle.DatabaseError: ORA-00907: missing right parenthesis >> >> Sorry for my omit , i should keep secret for my customer. The code >> is copy from my real code, i just change the table_name. >> and my table_name do not contain a "(" or ")" . >> I don't omit the error message. that is all. >> the last, sorry for my english, if you know how to deal this >> error, please tell me, thanks for your help! >> >> Best Wishes For You >> >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> 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 > > -- Regards, -suse |
From: Anthony T. <ant...@gm...> - 2015-08-15 14:48:03
|
Hi, It looks like the omitted code is rather important....as the last line you keep talks about __midSql but the line that actually errors talks about __dtlSql. Take a look at __dtlSql -- there will be a syntax error in your SQL there. :-) Anthony On Sat, Aug 15, 2015 at 2:00 AM, 地铁怪0 <196...@qq...> wrote: > Hi all: > This is my first time to use cx_Oracle, i get a problem, > > - This is my code: > > --omit-- > self.__midSql = "select sum(primal_fee) from ad.ca_daily_bill" > self.__db = cx_Oracle.Connection(self.__user, self.__passwd, > self.__dns) > self.__cursor = self.__db.cursor() > self.__cursor.execute(self.__midSql) > --omit-- > > > > - and the error: > > Traceback (most recent call last): > File "check_daily_bill_1.4.py", line 293, in <module> > query_DB.dailyQueryFromDB() > File "check_daily_bill_1.4.py", line 281, in dailyQueryFromDB > self.__cursor.execute(self.__dtlSql) > cx_Oracle.DatabaseError: ORA-00907: missing right parenthesis > > Sorry for my omit , i should keep secret for my customer. The code > is copy from my real code, i just change the table_name. > and my table_name do not contain a "(" or ")" . > I don't omit the error message. that is all. > the last, sorry for my english, if you know how to deal this error, > please tell me, thanks for your help! > > Best Wishes For You > > > ------------------------------------------------------------------------------ > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: 地. <196...@qq...> - 2015-08-15 08:01:08
|
Hi all: This is my first time to use cx_Oracle, i get a problem, This is my code: --omit-- self.__midSql = "select sum(primal_fee) from ad.ca_daily_bill" self.__db = cx_Oracle.Connection(self.__user, self.__passwd, self.__dns) self.__cursor = self.__db.cursor() self.__cursor.execute(self.__midSql) --omit-- and the error: Traceback (most recent call last): File "check_daily_bill_1.4.py", line 293, in <module> query_DB.dailyQueryFromDB() File "check_daily_bill_1.4.py", line 281, in dailyQueryFromDB self.__cursor.execute(self.__dtlSql) cx_Oracle.DatabaseError: ORA-00907: missing right parenthesis Sorry for my omit , i should keep secret for my customer. The code is copy from my real code, i just change the table_name. and my table_name do not contain a "(" or ")" . I don't omit the error message. that is all. the last, sorry for my english, if you know how to deal this error, please tell me, thanks for your help! Best Wishes For You |
From: avinash n. <avi...@or...> - 2015-08-04 12:40:41
|
Hello Till, There is a bug in the code. A fix is awaited. Best Regards, Avinash On 8/1/2015 11:50 PM, Till Franke wrote: > Hello, > > For security my client uses oracle wallet technology to store the connection credentials. Cx-Oracle 'Connection' objects work nicely when given the '/@tns' string with empty user/password and tns referencing a wallet entry, but I can not get a 'SessionPool' object this way it seems - what are the correct arguments to SessionPool in this case? > > Best regards > Till. > > ------------------------------------------------------------------------------ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |