cx-oracle-users Mailing List for cx_Oracle (Page 26)
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: David S. <ds...@ds...> - 2013-03-21 21:49:44
|
On Thu, Mar 21, 2013 at 5:36 PM, Christopher Jones < chr...@or...> wrote: > Try an explicit session pool: Thanks! It looks like this does the trick. -- David blog: http://www.traceback.org twitter: http://twitter.com/dstanek www: http://dstanek.com |
From: Christopher J. <chr...@or...> - 2013-03-21 21:37:09
|
On 03/21/2013 11:51 AM, David Stanek wrote: > We are seeing a strange issue where DRCP connections are not being returned to the pool even after the connection is closed. My sample code (http://pastebin.com/UB5cPtsZ) shows a really simple example where I create more processes than I have connections > in the pool. I expected the connection to be available for reuse by the time the child process sleeps. Then I would expect to see a stream of output and the processes would all exit in about 10 seconds. > > What I'm actually seeing is every process making a connection, but the queries for processes above the number of connections in the pool block until some of the processes die. So every 10 seconds or so a few more queries run. > > Does the process really need to die for the connection to be released? > > Thanks! Try an explicit session pool: import os import time import cx_Oracle def do_connection(): print 'starting do_connection ' + str(os.getpid()) mypool = cx_Oracle.SessionPool(user=user,password=pw,dsn=dsn,min=1,max=2,increment=1) con = cx_Oracle.connect(user=user, password=pw, dsn=dsn, pool = mypool, cclass="blah", purity=cx_Oracle.ATTR_PURITY_SELF) cur = con.cursor() print 'Querying ' + str(os.getpid()) cur.execute("select to_char(systimestamp) from dual") print cur.fetchall() cur.close() mypool.release(con) print 'Sleeping ' + str(os.getpid()) time.sleep(30) print 'finishing do_connection ' + str(os.getpid()) user = 'hr' pw = 'welcome' dsn = 'localhost/orcl:pooled' for x in range(100): pid = os.fork() if not pid: do_connection() os._exit(0) Mod_python etc users can create the session pool outside the handler, otherwise re-authentication occurs for every connect and NUM_AUTHENTICATIONS will equal NUM_REQUESTS in V$CPOOL_CC_STATS. Chris -- chr...@or... http://twitter.com/ghrd Newly updated, free PHP & Oracle book: http://www.oracle.com/technetwork/topics/php/underground-php-oracle-manual-098250.html |
From: Amaury F. d'A. <ama...@gm...> - 2013-03-21 20:24:31
|
2013/3/21 David Stanek <ds...@ds...> > Thanks for the quick reply. In a previous test I had a 'del cur' and 'del > con' right before the sleep and it still wasn't working. I'm wondering now > if it's possibly because of the test. > > I am using 5.1.1. I did download the code from the SF website, but the > only call to OCIServerDetach is in Connection_Free. Should it also be in > Connection_Close? > I just checked the 5.1.1 link on http://cx-oracle.sourceforge.net/ , and OCIServerDetach is already in Connection_Close. Anyway the diff is here: http://cx-oracle.svn.sourceforge.net/viewvc/cx-oracle/trunk/Connection.c?r1=348&r2=355 -- Amaury Forgeot d'Arc |
From: David S. <ds...@ds...> - 2013-03-21 20:12:29
|
Hmmm... It looks like I was looking at the 5.1 code. I do see it in the 5.1.1 code. On Thu, Mar 21, 2013 at 4:09 PM, David Stanek <ds...@ds...> wrote: > Thanks for the quick reply. In a previous test I had a 'del cur' and 'del > con' right before the sleep and it still wasn't working. I'm wondering now > if it's possibly because of the test. > > I am using 5.1.1. I did download the code from the SF website, but the > only call to OCIServerDetach is in Connection_Free. Should it also be in > Connection_Close? > > > > On Thu, Mar 21, 2013 at 3:57 PM, Amaury Forgeot d'Arc <ama...@gm...>wrote: > >> 2013/3/21 David Stanek <ds...@ds...> >> >>> We are seeing a strange issue where DRCP connections are not being >>> returned to the pool even after the connection is closed. My sample code ( >>> http://pastebin.com/UB5cPtsZ) shows a really simple example where I >>> create more processes than I have connections in the pool. I expected the >>> connection to be available for reuse by the time the child process sleeps. >>> Then I would expect to see a stream of output and the processes would all >>> exit in about 10 seconds. >>> >>> What I'm actually seeing is every process making a connection, but the >>> queries for processes above the number of connections in the pool block >>> until some of the processes die. So every 10 seconds or so a few more >>> queries run. >>> >>> Does the process really need to die for the connection to be released? >>> >> >> It has been a while, but I remember that at some point con.close() would >> call OCISessionEnd but not OCIServerDetach. >> Only the object destructor would call OCIServerDetach. >> You could try a "del con" just before the sleep. >> >> Looking at the HISTORY, this was fixed in version 5.1.1. >> Are you using an older version? >> >> -- >> Amaury Forgeot d'Arc >> >> ------------------------------------------------------------------------------ >> Everyone hates slow websites. So do we. >> Make your web apps faster with AppDynamics >> Download AppDynamics Lite for free today: >> http://p.sf.net/sfu/appdyn_d2d_mar >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> > > > -- > David > blog: http://www.traceback.org > twitter: http://twitter.com/dstanek > www: http://dstanek.com > -- David blog: http://www.traceback.org twitter: http://twitter.com/dstanek www: http://dstanek.com |
From: David S. <ds...@ds...> - 2013-03-21 20:09:27
|
Thanks for the quick reply. In a previous test I had a 'del cur' and 'del con' right before the sleep and it still wasn't working. I'm wondering now if it's possibly because of the test. I am using 5.1.1. I did download the code from the SF website, but the only call to OCIServerDetach is in Connection_Free. Should it also be in Connection_Close? On Thu, Mar 21, 2013 at 3:57 PM, Amaury Forgeot d'Arc <ama...@gm...>wrote: > 2013/3/21 David Stanek <ds...@ds...> > >> We are seeing a strange issue where DRCP connections are not being >> returned to the pool even after the connection is closed. My sample code ( >> http://pastebin.com/UB5cPtsZ) shows a really simple example where I >> create more processes than I have connections in the pool. I expected the >> connection to be available for reuse by the time the child process sleeps. >> Then I would expect to see a stream of output and the processes would all >> exit in about 10 seconds. >> >> What I'm actually seeing is every process making a connection, but the >> queries for processes above the number of connections in the pool block >> until some of the processes die. So every 10 seconds or so a few more >> queries run. >> >> Does the process really need to die for the connection to be released? >> > > It has been a while, but I remember that at some point con.close() would > call OCISessionEnd but not OCIServerDetach. > Only the object destructor would call OCIServerDetach. > You could try a "del con" just before the sleep. > > Looking at the HISTORY, this was fixed in version 5.1.1. > Are you using an older version? > > -- > Amaury Forgeot d'Arc > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > -- David blog: http://www.traceback.org twitter: http://twitter.com/dstanek www: http://dstanek.com |
From: Amaury F. d'A. <ama...@gm...> - 2013-03-21 19:57:47
|
2013/3/21 David Stanek <ds...@ds...> > We are seeing a strange issue where DRCP connections are not being > returned to the pool even after the connection is closed. My sample code ( > http://pastebin.com/UB5cPtsZ) shows a really simple example where I > create more processes than I have connections in the pool. I expected the > connection to be available for reuse by the time the child process sleeps. > Then I would expect to see a stream of output and the processes would all > exit in about 10 seconds. > > What I'm actually seeing is every process making a connection, but the > queries for processes above the number of connections in the pool block > until some of the processes die. So every 10 seconds or so a few more > queries run. > > Does the process really need to die for the connection to be released? > It has been a while, but I remember that at some point con.close() would call OCISessionEnd but not OCIServerDetach. Only the object destructor would call OCIServerDetach. You could try a "del con" just before the sleep. Looking at the HISTORY, this was fixed in version 5.1.1. Are you using an older version? -- Amaury Forgeot d'Arc |
From: David S. <ds...@ds...> - 2013-03-21 19:21:30
|
We are seeing a strange issue where DRCP connections are not being returned to the pool even after the connection is closed. My sample code ( http://pastebin.com/UB5cPtsZ) shows a really simple example where I create more processes than I have connections in the pool. I expected the connection to be available for reuse by the time the child process sleeps. Then I would expect to see a stream of output and the processes would all exit in about 10 seconds. What I'm actually seeing is every process making a connection, but the queries for processes above the number of connections in the pool block until some of the processes die. So every 10 seconds or so a few more queries run. Does the process really need to die for the connection to be released? Thanks! -- David blog: http://www.traceback.org twitter: http://twitter.com/dstanek www: http://dstanek.com |
From: Jani T. <re...@gm...> - 2013-03-20 15:01:50
|
Hi, As known at some point there was an enhancement to support Oracle user types for reading. So now I can read MDSYS.SDO_GEOMETRY typed columns without problems. But how to save them? What ever I do either just python.exe crashes or I get incorrect datatype for the column. And some geometries are so huge that putting them hardcoded in query isn't really an option. -- Jani Tiainen - Well planned is half done and a half done has been sufficient before... |
From: Mateusz L. <ma...@lo...> - 2013-03-15 12:51:16
|
Hi, I'm trying to install cx_Oracle 5.1.2 on Debian (32-bit, wheezy) where I have installed Oracle XE 10g (installed from .deb packages still available from oss.oracle.com). I've read BUILD.txt and README.txt and I believe I'm following those steps correctly, but the installation fails to locate Oracle. Here is my environment: $ echo $ORACLE_HOME /usr/lib/oracle/xe/app/oracle/product/10.2.0/server $ echo $LD_LIBRARY_PATH :/usr/lib/oracle/xe/app/oracle/product/10.2.0/server $ echo $PATH /home/mloskot/bin:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/mes:/usr/games Here is the error: $ sudo python setup.py install ... Traceback (most recent call last): File "setup.py", line 133, in <module> raise DistutilsSetupError("cannot locate an Oracle software " \ distutils.errors.DistutilsSetupError: cannot locate an Oracle software installation Quick inspection of setup.py and print-based debugging added in line 96 print(version, fileName, os.path.exists(fileName), subDirs) seems to suggest that my ORACLE_HOME is not being searched for client libraries: mloskot cx_Oracle-5.1.2 $ sudo python setup.py install ('11g', '/usr/local/sbin/libclntsh.so.11.1', False, ['lib', 'lib32']) ('10g', '/usr/local/sbin/libclntsh.so.10.1', False, ['lib', 'lib32']) ('9i', '/usr/local/sbin/libclntsh.so.9.0', False, ['lib', 'lib32']) ('11g', '/usr/local/bin/libclntsh.so.11.1', False, ['lib', 'lib32']) ('10g', '/usr/local/bin/libclntsh.so.10.1', False, ['lib', 'lib32']) ('9i', '/usr/local/bin/libclntsh.so.9.0', False, ['lib', 'lib32']) ('11g', '/usr/sbin/libclntsh.so.11.1', False, ['lib', 'lib32']) ('10g', '/usr/sbin/libclntsh.so.10.1', False, ['lib', 'lib32']) ('9i', '/usr/sbin/libclntsh.so.9.0', False, ['lib', 'lib32']) ('11g', '/usr/bin/libclntsh.so.11.1', False, ['lib', 'lib32']) ('10g', '/usr/bin/libclntsh.so.10.1', False, ['lib', 'lib32']) ('9i', '/usr/bin/libclntsh.so.9.0', False, ['lib', 'lib32']) ('11g', '/sbin/libclntsh.so.11.1', False, ['lib', 'lib32']) ('10g', '/sbin/libclntsh.so.10.1', False, ['lib', 'lib32']) ('9i', '/sbin/libclntsh.so.9.0', False, ['lib', 'lib32']) ('11g', '/bin/libclntsh.so.11.1', False, ['lib', 'lib32']) ('10g', '/bin/libclntsh.so.10.1', False, ['lib', 'lib32']) ('9i', '/bin/libclntsh.so.9.0', False, ['lib', 'lib32']) Traceback (most recent call last): File "setup.py", line 133, in <module> raise DistutilsSetupError("cannot locate an Oracle software " \ distutils.errors.DistutilsSetupError: cannot locate an Oracle software installation mloskot cx_Oracle-5.1.2 $ Am I missing any steps? Best regards, -- Mateusz Loskot, http://mateusz.loskot.net |
From: Jose S. <jos...@sf...> - 2013-03-13 13:45:34
|
It works :) thanks a lot, Amaury. j On 03/13/2013 01:27 PM, Amaury Forgeot d'Arc wrote: > Hi, > > 2013/3/12 Jose Soares <jos...@al... > <mailto:jos...@al...>> > > Hi all, > > I'm trying to returning UPDATE/INSERT/DELETE state. > > Is there a way to know the state of an UPDATE, for example, > if it fails or success, like in the following example? > > import cx_Oracle > DBURI = "sfa/5Y@16.3:1521/em" > connection = cx_Oracle.connect(DBURI) > cursor = connection.cursor() > success = cursor.execute("UPDATE TEST set id=17 where id=16") > print success > > > There are two kinds of "successes": > > - the first one is when the statement was executed without error. > In case of failure, an exception will be raised. > > - the other one is when the statement actually updated something. > For this you can look at "cursor.rowcount", this contains the number > of updated rows. > In your case, it will probably be zero or one. > > Hope this helps, > -- > Amaury Forgeot d'Arc > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Amaury F. d'A. <ama...@gm...> - 2013-03-13 12:27:26
|
Hi, 2013/3/12 Jose Soares <jos...@al...> > Hi all, > > I'm trying to returning UPDATE/INSERT/DELETE state. > > Is there a way to know the state of an UPDATE, for example, > if it fails or success, like in the following example? > > import cx_Oracle > DBURI = "sfa/5Y@16.3:1521/em" > connection = cx_Oracle.connect(DBURI) > cursor = connection.cursor() > success = cursor.execute("UPDATE TEST set id=17 where id=16") > print success > There are two kinds of "successes": - the first one is when the statement was executed without error. In case of failure, an exception will be raised. - the other one is when the statement actually updated something. For this you can look at "cursor.rowcount", this contains the number of updated rows. In your case, it will probably be zero or one. Hope this helps, -- Amaury Forgeot d'Arc |
From: Jose S. <jos...@al...> - 2013-03-12 17:07:30
|
If you are interested in a more friendly sql*plus written in python and cx_Oracle for linux, you can download it from here: http://code.activestate.com/recipes/578490-sql-the-sqlplus-killer/?c=15145 j |
From: Jose S. <jos...@al...> - 2013-03-12 10:03:54
|
Hi all, I'm trying to returning UPDATE/INSERT/DELETE state. Is there a way to know the state of an UPDATE, for example, if it fails or success, like in the following example? import cx_Oracle DBURI = "sfa/5Y@16.3:1521/em" connection = cx_Oracle.connect(DBURI) cursor = connection.cursor() success = cursor.execute("UPDATE TEST set id=17 where id=16") print success thanks for any help. j |
From: Joel S. <js...@cp...> - 2013-03-06 13:56:43
|
Hi Anthony, This was great guidance; thank you. -joel From: Anthony Tuininga [mailto:ant...@gm...] Sent: Friday, March 01, 2013 3:52 PM To: cx-...@li... Subject: Re: [cx-oracle-users] Supporting multiple versions and multiple bits Hi, I have done something similar in the past. I grabbed multiple copies of cx_Oracle and renamed them to cx_Oracle_11g, cx_Oracle_10g, etc. and then used the imp module to load the right one. Once the module is loaded it behaves just like normal. If you want some sample code you can look at the cx_OracleDBATools package. Anthony On Fri, Mar 1, 2013 at 12:57 PM, Joel Slowik <js...@cp...<mailto:js...@cp...>> wrote: Hello list, I am building a package that is expected will be used on multiple environments. One environment might have 11g 64-bit, another might be 9i 32-bit, and everything in between. >From what I can tell, cx_oracle is dependent on the version and bit. Could someone provide some tips and best-practices to handle all of these environments in my code? Rather than supporting multiple versions of my code, I would rather have one version that can dynamically determine which version of cx_oracle to use. Thanks, -joel ________________________________ Confidentiality Note: This electronic message transmission is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this transmission, but are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this information is strictly prohibited. If you have received this e-mail in error, please contact Continuum Performance Systems at {203.245.5000<tel:203.245.5000>} and delete and destroy the original message and all copies. ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb _______________________________________________ cx-oracle-users mailing list cx-...@li...<mailto:cx-...@li...> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users ________________________________ Confidentiality Note: This electronic message transmission is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this transmission, but are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this information is strictly prohibited. If you have received this e-mail in error, please contact Continuum Performance Systems at {203.245.5000} and delete and destroy the original message and all copies. |
From: Anthony T. <ant...@gm...> - 2013-03-01 20:51:53
|
Hi, I have done something similar in the past. I grabbed multiple copies of cx_Oracle and renamed them to cx_Oracle_11g, cx_Oracle_10g, etc. and then used the imp module to load the right one. Once the module is loaded it behaves just like normal. If you want some sample code you can look at the cx_OracleDBATools package. Anthony On Fri, Mar 1, 2013 at 12:57 PM, Joel Slowik <js...@cp...> wrote: > Hello list, > > > > I am building a package that is expected will be used on multiple > environments. One environment might have 11g 64-bit, another might be 9i > 32-bit, and everything in between. > > > > From what I can tell, cx_oracle is dependent on the version and bit. > > > > Could someone provide some tips and best-practices to handle all of these > environments in my code? Rather than supporting multiple versions of my > code, I would rather have one version that can dynamically determine which > version of cx_oracle to use. > > > > Thanks, > > -joel > ------------------------------ > Confidentiality Note: This electronic message transmission is intended > only for the person or entity to which it is addressed and may contain > information that is privileged, confidential or otherwise protected from > disclosure. If you have received this transmission, but are not the > intended recipient, you are hereby notified that any disclosure, copying, > distribution or use of the contents of this information is strictly > prohibited. If you have received this e-mail in error, please contact > Continuum Performance Systems at {203.245.5000} and delete and destroy > the original message and all copies. > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_feb > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Joel S. <js...@cp...> - 2013-03-01 20:14:11
|
Hello list, I am building a package that is expected will be used on multiple environments. One environment might have 11g 64-bit, another might be 9i 32-bit, and everything in between. >From what I can tell, cx_oracle is dependent on the version and bit. Could someone provide some tips and best-practices to handle all of these environments in my code? Rather than supporting multiple versions of my code, I would rather have one version that can dynamically determine which version of cx_oracle to use. Thanks, -joel ________________________________ Confidentiality Note: This electronic message transmission is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this transmission, but are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this information is strictly prohibited. If you have received this e-mail in error, please contact Continuum Performance Systems at {203.245.5000} and delete and destroy the original message and all copies. |
From: Waldemar O. <wal...@gm...> - 2013-02-23 15:59:17
|
On Sat, Feb 23, 2013 at 2:04 AM, Stefan Champailler <sch...@sk...>wrote: > I do have a c:\oracle directory and a TNS file. Unfortunately, the TNS file > doesn't contain the connection information for the database I'm trying > to reach > It is possible to connect to a database without a TNS entry. As long as you know HOST, PORT (probably 1521), SERVICE_NAME you can make up connection string like this. >>> import cx_Oracle as dbi >>> conn = dbi.connect('<USERNAME>/<PASSWORD>@//<HOST>:<PORT>/<SERVICE_NAME>') >>> cur = conn.cursor() |
From: Anthony T. <ant...@gm...> - 2013-02-23 15:18:38
|
On Sat, Feb 23, 2013 at 2:05 AM, Stefan Champailler <sch...@sk...>wrote: > As said in another post, there's not even an ORACLE_HOME... Welcome to > corporate world... > And on Windows, there generally should *NOT* be. :-) So that's all fine. Just make sure that the Oracle home you want to use is *first* in the PATH environment variable and all should be well. And I am familiar with "corporate world" and can sympathize with you. :) Anthony > > (for more explanations see my other post) > > stF > > > > > On 02/18/2013 09:15 PM, Joram Agten wrote: > > Hint; what does your ORACLE_HOME point to? > > > cx_Oracle.version > > '5.1.2' > > cx_Oracle.version() > > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > TypeError: 'str' object is not callable > > On Mon, Feb 18, 2013 at 9:02 PM, Stefan Champailler<sch...@sk...> <sch...@sk...>wrote: > > > cx_oracle.version() > > reports (10,2,...) > > However, my cx_oracle version is from > > cx_Oracle-5.1.2-11g.win32-py2.7.msi > > So I'm surprised to see a ref. to the 10.2 client in the call above... > > Is this normal ? > > Regards, > > Stefan > > -- > Timeo Danaos et dona ferentes > > > > ------------------------------------------------------------------------------ > The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, > is your hub for all things parallel software development, from weekly > thought > leadership blogs to news, videos, case studies, tutorials, tech docs, > whitepapers, evaluation guides, and opinion stories. Check out the most > recent posts - join the conversation now.http://goparallel.sourceforge.net/ > _______________________________________________ > cx-oracle-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > ------------------------------------------------------------------------------ > The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, > is your hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials, tech docs, > whitepapers, evaluation guides, and opinion stories. Check out the most > recent posts - join the conversation now. http://goparallel.sourceforge.net/ > > > > _______________________________________________ > cx-oracle-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > -- > Timeo Danaos et dona ferentes > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_feb > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Stefan C. <sch...@sk...> - 2013-02-23 09:06:07
|
As said in another post, there's not even an ORACLE_HOME... Welcome to corporate world... (for more explanations see my other post) stF On 02/18/2013 09:15 PM, Joram Agten wrote: > Hint; what does your ORACLE_HOME point to? > >>>> cx_Oracle.version > '5.1.2' >>>> cx_Oracle.version() > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > TypeError: 'str' object is not callable > > On Mon, Feb 18, 2013 at 9:02 PM, Stefan Champailler > <sch...@sk...>wrote: > >> cx_oracle.version() >> >> reports (10,2,...) >> >> However, my cx_oracle version is from >> >> cx_Oracle-5.1.2-11g.win32-py2.7.msi >> >> So I'm surprised to see a ref. to the 10.2 client in the call above... >> >> Is this normal ? >> >> Regards, >> >> Stefan >> >> -- >> Timeo Danaos et dona ferentes >> >> >> >> ------------------------------------------------------------------------------ >> The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, >> is your hub for all things parallel software development, from weekly >> thought >> leadership blogs to news, videos, case studies, tutorials, tech docs, >> whitepapers, evaluation guides, and opinion stories. Check out the most >> recent posts - join the conversation now. >> http://goparallel.sourceforge.net/ >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > > > ------------------------------------------------------------------------------ > The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, > is your hub for all things parallel software development, from weekly thought > leadership blogs to news, videos, case studies, tutorials, tech docs, > whitepapers, evaluation guides, and opinion stories. Check out the most > recent posts - join the conversation now. http://goparallel.sourceforge.net/ > > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users -- Timeo Danaos et dona ferentes |
From: Stefan C. <sch...@sk...> - 2013-02-23 09:04:55
|
Ahhhh... Now it's crystal clear. I've checked my installation (I'm under stringent corporate policies). I do have a c:\oracle directory and a TNS file. Unfortunately, the TNS file doesn't contain the connection information for the database I'm trying to reach. And to make things worse, the TNS file is under admin privileges so I can't modify it myself... Moreover, by default, there's no ORACLE_HOME env. variable set... Finally, it looks like my client software is 10.2 and not 11 (although the server I use is definitely 11g). I just tell you all of that to explain why it's not easy. (and to be 100% honest, I don't even think that python is actually authorised down here). So, I requested my helpdesk to install a 11g client and, well, once this is done, I'll check again. But at least, your (quick!) comment, made me realize the whole complexity of the story. (needless to say that on my Linux box, that's waaaaay easier). In the meantime, I'll give it another shot with the 10.2 release. I'll keep you informed. Stefan On 02/19/2013 06:40 AM, Anthony Tuininga wrote: > Hi Stefan, > > cx_Oracle.clientversion() reports the version of the client that you are > actually using, *NOT* the one that cx_Oracle was compiled with. You would > be best off matching the two! Take a look at which version of Oracle is > earliest in your PATH -- that is the one that will be searched and used. If > you have SQL*Plus installed that will help ensure that you have a working > Oracle installation and which version you are actually using. Note that the > client version and server version do not have to match -- although if you > can make them do so that will result in fewer headaches. There are very few > issues generally but on the odd occasion it does cause problems. > > Hope that helps. > > Anthony > > > On Mon, Feb 18, 2013 at 8:19 AM, <sch...@sk...> wrote: > >> Hello, >> >> Today, I've dowloaded and successfully installed : >> >> cx_Oracle-5.1.2-11g.win32-py2.7.msi >> >> However, when I run this code : >> >> import cx_Oracle >> print cx_Oracle.clientversion() >> >> I get : >> >> (10, 2, 0, 1, 0) >> >> Which looks strange to me. Since I've dowloaded a 11g version, I'd expect >> the client version to reflect that... >> >> Is that normal ? >> >> (I ask because I can't connect to some 11g databases...) >> >> Stefan >> >> >> >> ------------------------------------------------------------------------------ >> The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, >> is your hub for all things parallel software development, from weekly >> thought >> leadership blogs to news, videos, case studies, tutorials, tech docs, >> whitepapers, evaluation guides, and opinion stories. Check out the most >> recent posts - join the conversation now. >> http://goparallel.sourceforge.net/ >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_feb > > > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users -- Timeo Danaos et dona ferentes |
From: Anthony T. <ant...@gm...> - 2013-02-19 05:40:15
|
Hi Stefan, cx_Oracle.clientversion() reports the version of the client that you are actually using, *NOT* the one that cx_Oracle was compiled with. You would be best off matching the two! Take a look at which version of Oracle is earliest in your PATH -- that is the one that will be searched and used. If you have SQL*Plus installed that will help ensure that you have a working Oracle installation and which version you are actually using. Note that the client version and server version do not have to match -- although if you can make them do so that will result in fewer headaches. There are very few issues generally but on the odd occasion it does cause problems. Hope that helps. Anthony On Mon, Feb 18, 2013 at 8:19 AM, <sch...@sk...> wrote: > > Hello, > > Today, I've dowloaded and successfully installed : > > cx_Oracle-5.1.2-11g.win32-py2.7.msi > > However, when I run this code : > > import cx_Oracle > print cx_Oracle.clientversion() > > I get : > > (10, 2, 0, 1, 0) > > Which looks strange to me. Since I've dowloaded a 11g version, I'd expect > the client version to reflect that... > > Is that normal ? > > (I ask because I can't connect to some 11g databases...) > > Stefan > > > > ------------------------------------------------------------------------------ > The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, > is your hub for all things parallel software development, from weekly > thought > leadership blogs to news, videos, case studies, tutorials, tech docs, > whitepapers, evaluation guides, and opinion stories. Check out the most > recent posts - join the conversation now. > http://goparallel.sourceforge.net/ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Joram A. <jor...@gm...> - 2013-02-18 20:16:05
|
Hint; what does your ORACLE_HOME point to? >>> cx_Oracle.version '5.1.2' >>> cx_Oracle.version() Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'str' object is not callable >>> On Mon, Feb 18, 2013 at 9:02 PM, Stefan Champailler <sch...@sk...>wrote: > cx_oracle.version() > > reports (10,2,...) > > However, my cx_oracle version is from > > cx_Oracle-5.1.2-11g.win32-py2.7.msi > > So I'm surprised to see a ref. to the 10.2 client in the call above... > > Is this normal ? > > Regards, > > Stefan > > -- > Timeo Danaos et dona ferentes > > > > ------------------------------------------------------------------------------ > The Go Parallel Website, sponsored by Intel - in partnership with Geeknet, > is your hub for all things parallel software development, from weekly > thought > leadership blogs to news, videos, case studies, tutorials, tech docs, > whitepapers, evaluation guides, and opinion stories. Check out the most > recent posts - join the conversation now. > http://goparallel.sourceforge.net/ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Stefan C. <sch...@sk...> - 2013-02-18 20:02:22
|
cx_oracle.version() reports (10,2,...) However, my cx_oracle version is from cx_Oracle-5.1.2-11g.win32-py2.7.msi So I'm surprised to see a ref. to the 10.2 client in the call above... Is this normal ? Regards, Stefan -- Timeo Danaos et dona ferentes |
From: <sch...@sk...> - 2013-02-18 15:19:49
|
undefined |
From: Martijn P. <mj...@zo...> - 2013-02-03 23:56:55
|
On Thu, Jan 31, 2013 at 1:35 AM, Mark Harrison <mh...@pi...> wrote: > Somebody oddly thinks this isn't a real question... > > http://stackoverflow.com/questions/592/how-do-i-access-oracle-from-python > > Check it out, and if you've got the points help reopen it! Sorry, I do think it should remain closed. Stack Overflow is not a place for shopping questions I'm afraid. The Stack Overflow has, over time, learned what makes a constructive question, and shopping questions are not it. -- Martijn Pieters |