cx-oracle-users Mailing List for cx_Oracle (Page 51)
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: Anthony T. <ant...@gm...> - 2010-09-02 18:56:54
|
Ok. I missed that. :-) I don't always pay attention to who is asking me questions and look to see if two questions asked by the same person are related. Sorry for the noise. Anthony On Thu, Sep 2, 2010 at 12:44 PM, Cliff Martin <cli...@gm...> wrote: > This was part of another question you have already answered. The problem was > that cx_Oracle was not being built due to libttsh11 not being > included/linked to. > > -- > > Cliff > > > On Thu, Sep 2, 2010 at 2:32 PM, Anthony Tuininga > <ant...@gm...> wrote: >> >> Hmm, not sure why you would be running into difficulties. You could >> make sure that the location calculated in the test() command in >> setup.py actually contains a copy of cx_Oracle. You should also show >> the output from your command as that might help determine the problem, >> too. >> >> Anthony >> >> On Thu, Aug 26, 2010 at 11:07 AM, Cliff Martin <cli...@gm...> >> wrote: >> > I am trying to get cx_Oracle working with a new install of Python 3 on >> > HP-UX, and it's not working when I try to run the tests. It says >> > ImportError: not able to import cx_Oracle. >> > >> > I can't seem to find any information on why it's not working, and I was >> > hoping that someone could point me in a direction. This same setup works >> > with Python 2.6.5. >> > >> > I have done the following: >> > >> > python3 setup.py build >> > >> > and then >> > >> > python3 setup.py test >> > >> > the test step fails to import. >> > >> > Specifics: >> > >> > Platform: HP-UX 11.31 on Itanium (IA64) >> > Python: 3.1.2 >> > cx_Oracle: 5.0.4 >> > gcc: 4.4.3 >> > Oracle: 11.1.0 (or maybe 11.2.0, I point to the client for 11.1.0, but >> > it's >> > actually running 11.2.0) >> > >> > Build options: -mlp64 (for 64 bit build) >> > >> > -- >> > >> > Cliff >> > >> > >> > ------------------------------------------------------------------------------ >> > Sell apps to millions through the Intel(R) Atom(Tm) Developer Program >> > Be part of this innovative community and reach millions of netbook users >> > worldwide. Take advantage of special opportunities to increase revenue >> > and >> > speed time-to-market. Join now, and jumpstart your future. >> > http://p.sf.net/sfu/intel-atom-d2d >> > _______________________________________________ >> > cx-oracle-users mailing list >> > cx-...@li... >> > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> > >> > >> >> >> ------------------------------------------------------------------------------ >> This SF.net Dev2Dev email is sponsored by: >> >> Show off your parallel programming skills. >> Enter the Intel(R) Threading Challenge 2010. >> http://p.sf.net/sfu/intel-thread-sfd >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > ------------------------------------------------------------------------------ > This SF.net Dev2Dev email is sponsored by: > > Show off your parallel programming skills. > Enter the Intel(R) Threading Challenge 2010. > http://p.sf.net/sfu/intel-thread-sfd > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Cliff M. <cli...@gm...> - 2010-09-02 18:44:23
|
This was part of another question you have already answered. The problem was that cx_Oracle was not being built due to libttsh11 not being included/linked to. -- Cliff On Thu, Sep 2, 2010 at 2:32 PM, Anthony Tuininga <ant...@gm... > wrote: > Hmm, not sure why you would be running into difficulties. You could > make sure that the location calculated in the test() command in > setup.py actually contains a copy of cx_Oracle. You should also show > the output from your command as that might help determine the problem, > too. > > Anthony > > On Thu, Aug 26, 2010 at 11:07 AM, Cliff Martin <cli...@gm...> > wrote: > > I am trying to get cx_Oracle working with a new install of Python 3 on > > HP-UX, and it's not working when I try to run the tests. It says > > ImportError: not able to import cx_Oracle. > > > > I can't seem to find any information on why it's not working, and I was > > hoping that someone could point me in a direction. This same setup works > > with Python 2.6.5. > > > > I have done the following: > > > > python3 setup.py build > > > > and then > > > > python3 setup.py test > > > > the test step fails to import. > > > > Specifics: > > > > Platform: HP-UX 11.31 on Itanium (IA64) > > Python: 3.1.2 > > cx_Oracle: 5.0.4 > > gcc: 4.4.3 > > Oracle: 11.1.0 (or maybe 11.2.0, I point to the client for 11.1.0, but > it's > > actually running 11.2.0) > > > > Build options: -mlp64 (for 64 bit build) > > > > -- > > > > Cliff > > > > > ------------------------------------------------------------------------------ > > Sell apps to millions through the Intel(R) Atom(Tm) Developer Program > > Be part of this innovative community and reach millions of netbook users > > worldwide. Take advantage of special opportunities to increase revenue > and > > speed time-to-market. Join now, and jumpstart your future. > > http://p.sf.net/sfu/intel-atom-d2d > > _______________________________________________ > > cx-oracle-users mailing list > > cx-...@li... > > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > > > > ------------------------------------------------------------------------------ > This SF.net Dev2Dev email is sponsored by: > > Show off your parallel programming skills. > Enter the Intel(R) Threading Challenge 2010. > http://p.sf.net/sfu/intel-thread-sfd > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Anthony T. <ant...@gm...> - 2010-09-02 18:32:14
|
Hmm, not sure why you would be running into difficulties. You could make sure that the location calculated in the test() command in setup.py actually contains a copy of cx_Oracle. You should also show the output from your command as that might help determine the problem, too. Anthony On Thu, Aug 26, 2010 at 11:07 AM, Cliff Martin <cli...@gm...> wrote: > I am trying to get cx_Oracle working with a new install of Python 3 on > HP-UX, and it's not working when I try to run the tests. It says > ImportError: not able to import cx_Oracle. > > I can't seem to find any information on why it's not working, and I was > hoping that someone could point me in a direction. This same setup works > with Python 2.6.5. > > I have done the following: > > python3 setup.py build > > and then > > python3 setup.py test > > the test step fails to import. > > Specifics: > > Platform: HP-UX 11.31 on Itanium (IA64) > Python: 3.1.2 > cx_Oracle: 5.0.4 > gcc: 4.4.3 > Oracle: 11.1.0 (or maybe 11.2.0, I point to the client for 11.1.0, but it's > actually running 11.2.0) > > Build options: -mlp64 (for 64 bit build) > > -- > > Cliff > > ------------------------------------------------------------------------------ > Sell apps to millions through the Intel(R) Atom(Tm) Developer Program > Be part of this innovative community and reach millions of netbook users > worldwide. Take advantage of special opportunities to increase revenue and > speed time-to-market. Join now, and jumpstart your future. > http://p.sf.net/sfu/intel-atom-d2d > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Anthony T. <ant...@gm...> - 2010-08-31 17:11:51
|
Hi Alex, Thanks for the explanation of the problem and the supplied patch. Patch applied. Anthony On Tue, Aug 31, 2010 at 9:24 AM, Alex Wood <aw...@re...> wrote: > Hi, > > In setup.py, there is a section to find the include directory. > > Right now the code looks like this: > > if not includeDirs: > path = oracleHome.replace("lib", "include") > if os.path.isdir(path): > includeDirs.append(path) > if not includeDirs: > > The problem is on x86_64 systems the path ends up being > "/usr/include64/oracle/10.2.0/client" instead of > "/usr/include/oracle/10.2.0/client" > > I have attached a small patch that will fix this problem. > ---------------- > Regards, > Alex Wood > > -- > Senior Software Engineer > Red Hat > 919.754.4445 > > ------------------------------------------------------------------------------ > This SF.net Dev2Dev email is sponsored by: > > Show off your parallel programming skills. > Enter the Intel(R) Threading Challenge 2010. > http://p.sf.net/sfu/intel-thread-sfd > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |
From: Alex W. <aw...@re...> - 2010-08-31 16:13:34
|
Hi, In setup.py, there is a section to find the include directory. Right now the code looks like this: if not includeDirs: path = oracleHome.replace("lib", "include") if os.path.isdir(path): includeDirs.append(path) if not includeDirs: The problem is on x86_64 systems the path ends up being "/usr/include64/oracle/10.2.0/client" instead of "/usr/include/oracle/10.2.0/client" I have attached a small patch that will fix this problem. ---------------- Regards, Alex Wood -- Senior Software Engineer Red Hat 919.754.4445 |
From: Cliff M. <cli...@gm...> - 2010-08-26 17:07:25
|
I am trying to get cx_Oracle working with a new install of Python 3 on HP-UX, and it's not working when I try to run the tests. It says ImportError: not able to import cx_Oracle. I can't seem to find any information on why it's not working, and I was hoping that someone could point me in a direction. This same setup works with Python 2.6.5. I have done the following: python3 setup.py build and then python3 setup.py test the test step fails to import. Specifics: Platform: HP-UX 11.31 on Itanium (IA64) Python: 3.1.2 cx_Oracle: 5.0.4 gcc: 4.4.3 Oracle: 11.1.0 (or maybe 11.2.0, I point to the client for 11.1.0, but it's actually running 11.2.0) Build options: -mlp64 (for 64 bit build) -- Cliff |
From: Brianna L. <bri...@gm...> - 2010-08-19 09:18:49
|
... so about five minutes after I wrote this, I finally figured out it's called a schema, and I can get it to quote correctly by using the right incantation of quotes as exemplified here http://cd-docdb.fnal.gov/cgi-bin/RetrieveFile?docid=3156&version=1&filename=DjangoOracle.html . thanks anyway :) Brianna On 19 August 2010 18:47, Brianna Laugher <bri...@gm...> wrote: > Hi again, > > This is probably more about Oracle than cx_Oracle, but my googling is > not bringing me much today. > > There are a bunch of views that I am interested in, but to access them > I seem to need to use an extra field to identify them. Does a field > 'Owner' have special significance in Oracle? > > Why do I need to refer to the view as owner.view_name to be able to > select data from it? > > What is this "owner" here? Is it a tablespace...? Some kind of prefix? > > The reason is that I'm trying to hook Django up to my existing > database. In my models I can specify the database table name, > (actually a view, but that seems to be OK), but I can't specify > whatever the "owner" field is. Specfiying the table name as > "$OWNER.EDIT_STATISTICS" (where $OWNER is the real value of owner, not > the string 'owner') also does not work as the SQL escaping is not > happy. It produces things like this: > > SELECT "$OWNER.EDIT_STATISTICS"."GROUP_NAME" FROM "$OWNER.EDIT_STATISTICS" > which give a ORA-00942: table or view does not exist > > obviously what I need is > SELECT "$OWNER"."EDIT_STATISTICS"."GROUP_NAME" FROM "$OWNER"."EDIT_STATISTICS" > > but what is this mysterious first field? > > thanks, > Brianna > > >>>> cursor.execute("select view_name from all_views where owner='%s'" % OWNER) > <__builtin__.OracleCursor on <cx_Oracle.Connection to user @local>> >>>> for c in cursor: > ... print c > ... > [...] > ('EDIT_STATISTICS',) > [...] >>>> myview = 'EDIT_STATISTICS' >>>> cursor.execute("select * from %s" % myview) > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > cx_Oracle.DatabaseError: ORA-00942: table or view does not exist > >>>> cursor.execute("select * from %s.%s" % (OWNER, myview)) > <__builtin__.OracleCursor on <cx_Oracle.Connection to user @local>> > > > > -- > They've just been waiting in a mountain for the right moment: > http://modernthings.org/ > -- They've just been waiting in a mountain for the right moment: http://modernthings.org/ |
From: Brianna L. <bri...@gm...> - 2010-08-19 08:48:05
|
Hi again, This is probably more about Oracle than cx_Oracle, but my googling is not bringing me much today. There are a bunch of views that I am interested in, but to access them I seem to need to use an extra field to identify them. Does a field 'Owner' have special significance in Oracle? Why do I need to refer to the view as owner.view_name to be able to select data from it? What is this "owner" here? Is it a tablespace...? Some kind of prefix? The reason is that I'm trying to hook Django up to my existing database. In my models I can specify the database table name, (actually a view, but that seems to be OK), but I can't specify whatever the "owner" field is. Specfiying the table name as "$OWNER.EDIT_STATISTICS" (where $OWNER is the real value of owner, not the string 'owner') also does not work as the SQL escaping is not happy. It produces things like this: SELECT "$OWNER.EDIT_STATISTICS"."GROUP_NAME" FROM "$OWNER.EDIT_STATISTICS" which give a ORA-00942: table or view does not exist obviously what I need is SELECT "$OWNER"."EDIT_STATISTICS"."GROUP_NAME" FROM "$OWNER"."EDIT_STATISTICS" but what is this mysterious first field? thanks, Brianna >>> cursor.execute("select view_name from all_views where owner='%s'" % OWNER) <__builtin__.OracleCursor on <cx_Oracle.Connection to user @local>> >>> for c in cursor: ... print c ... [...] ('EDIT_STATISTICS',) [...] >>> myview = 'EDIT_STATISTICS' >>> cursor.execute("select * from %s" % myview) Traceback (most recent call last): File "<stdin>", line 1, in <module> cx_Oracle.DatabaseError: ORA-00942: table or view does not exist >>> cursor.execute("select * from %s.%s" % (OWNER, myview)) <__builtin__.OracleCursor on <cx_Oracle.Connection to user @local>> -- They've just been waiting in a mountain for the right moment: http://modernthings.org/ |
From: Brianna L. <bri...@gm...> - 2010-08-19 01:09:58
|
On 18 August 2010 21:45, Weber, Geoffrey <Geo...@pa...> wrote: > You should be able to get the Oracle "Instant Client". The files you are missing are part of the SDK download on the page. Go to http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html, select the proper OS, and download the SDK part of the client. For Linux x86_64, the file is: > oracle-instantclient11.2-sdk-11.2.0.1.0-1.x86_64.zip > > Unzip that to your ORACLE_HOME directory. Due to the way your directories are set up, you'll probably have to move the instant_client_11_2 directory's contents up a level to your $ORACLE_HOME dir. > > Good luck! Thanks so much!! I was able to install cx_Oracle via pip after putting a symlink in $ORACLE_HOME to the files in the zip as you suggested (more or less). It feels like a miracle. Now I can get on to the interesting stuff :) many thanks Brianna -- They've just been waiting in a mountain for the right moment: http://modernthings.org/ |
From: Anthony T. <ant...@gm...> - 2010-08-18 16:58:34
|
On Wed, Aug 18, 2010 at 9:40 AM, Mark McMahon <mar...@au...> wrote: > Hi, > > > > One trick might be to run something like > > Msiexec.exe cx_oracle.msi targetdir=c:\some\directory > > On another machine > > > > That should get you the files in the MSI - you could then maybe > modify/re-create the setup.py script? (or get it and modify it from source > distribution?), and use python setup.py install > > > > The above is ‘possible’ though may not be the ‘right’ solution. > > > > Hmm – I just looked in my site-packages folder – and it seems that cx_Oracle > is in a pyd file (and no py files or package) (I never realized). > > If I am right – then in that case you just need to copy cx_Oracle.pyd into > the python\lib\site-packages directory on each machine. (assuming you have > Oracle etc required). You are correct. Simply copy the cx_Oracle.pyd file into some place in your PYTHONPATH and you are good to go so long as you already have an Oracle client of some sort on your machine. Anthony |
From: Mark M. <mar...@au...> - 2010-08-18 15:41:26
|
Hi, One trick might be to run something like Msiexec.exe cx_oracle.msi targetdir=c:\some\directory On another machine That should get you the files in the MSI - you could then maybe modify/re-create the setup.py script? (or get it and modify it from source distribution?), and use python setup.py install The above is 'possible' though may not be the 'right' solution. Hmm - I just looked in my site-packages folder - and it seems that cx_Oracle is in a pyd file (and no py files or package) (I never realized). If I am right - then in that case you just need to copy cx_Oracle.pyd into the python\lib\site-packages directory on each machine. (assuming you have Oracle etc required). Hope that helps a little, Mark From: Rob Dunfey [mailto:ro...@gi...] Sent: Wednesday, August 18, 2010 22:54 PM To: cx-...@li... Subject: [cx-oracle-users] cx-oracle reverse engineer msi - or msi alternative? Dear List, We work in a 'locked down' Windows environment and can't run the CX Oracle MSI, is there any other way that we can deploy the libraries installed by the MSI without running the MSI? Any suggestions much appreciated, Kind Regards, Rob Dunfey |
From: Rob D. <ro...@gi...> - 2010-08-18 15:17:01
|
Dear List, We work in a 'locked down' Windows environment and can't run the CX Oracle MSI, is there any other way that we can deploy the libraries installed by the MSI without running the MSI? Any suggestions much appreciated, Kind Regards, Rob Dunfey |
From: Weber, G. <Geo...@PA...> - 2010-08-18 12:17:53
|
You should be able to get the Oracle "Instant Client". The files you are missing are part of the SDK download on the page. Go to http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html, select the proper OS, and download the SDK part of the client. For Linux x86_64, the file is: oracle-instantclient11.2-sdk-11.2.0.1.0-1.x86_64.zip Unzip that to your ORACLE_HOME directory. Due to the way your directories are set up, you'll probably have to move the instant_client_11_2 directory's contents up a level to your $ORACLE_HOME dir. Good luck! ________________________________________ From: Brianna Laugher [bri...@gm...] Sent: Wednesday, August 18, 2010 1:18 AM To: cx-...@li... Subject: [cx-oracle-users] Installing cx_Oracle on Fedora 12 - Oracle include files Hi, I am having trouble installing cx_Oracle on my Fedora 12 machine. Via pip or manually, I get the error distutils.errors.DistutilsSetupError: cannot locate Oracle include files I don't know if I actually _have_ the Oracle include files. I just have sqlplus64 to connect to someone else's database. I have these in my .bash_profile: export ORACLE_VERSION=11.2 export ORACLE_HOME=/usr/lib/oracle/$ORACLE_VERSION/client64 export PATH=$PATH:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib export TNS_ADMIN=/etc export TWO_TASK=fdb.ho I was also given a couple of files, /etc/tnsnames.ora /etc/sqlnet.ora. These are the files I have in the $ORACLE_HOME/lib - I tried changing LD_LIBRARY_PATH to just be set to that, too - glogin.sql libclntsh.so.11.1 libnnz11.so libocci.so.11.1 libociei.so libocijdbc11.so libsqlplusic.so libsqlplus.so ojdbc5.jar ojdbc6.jar xstreams.jar What files is it looking for? I don't know much about how Oracle works so I'm pretty lost. Would just like to be able to read my database via python instead of the horrid sqlplus command line! thanks Brianna ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ cx-oracle-users mailing list cx-...@li... https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Brianna L. <bri...@gm...> - 2010-08-18 06:18:49
|
Hi, I am having trouble installing cx_Oracle on my Fedora 12 machine. Via pip or manually, I get the error distutils.errors.DistutilsSetupError: cannot locate Oracle include files I don't know if I actually _have_ the Oracle include files. I just have sqlplus64 to connect to someone else's database. I have these in my .bash_profile: export ORACLE_VERSION=11.2 export ORACLE_HOME=/usr/lib/oracle/$ORACLE_VERSION/client64 export PATH=$PATH:$ORACLE_HOME/bin export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib export TNS_ADMIN=/etc export TWO_TASK=fdb.ho I was also given a couple of files, /etc/tnsnames.ora /etc/sqlnet.ora. These are the files I have in the $ORACLE_HOME/lib - I tried changing LD_LIBRARY_PATH to just be set to that, too - glogin.sql libclntsh.so.11.1 libnnz11.so libocci.so.11.1 libociei.so libocijdbc11.so libsqlplusic.so libsqlplus.so ojdbc5.jar ojdbc6.jar xstreams.jar What files is it looking for? I don't know much about how Oracle works so I'm pretty lost. Would just like to be able to read my database via python instead of the horrid sqlplus command line! thanks Brianna |
From: sara b. <sar...@gm...> - 2010-08-16 08:29:50
|
**<http://research.microsoft.com/en-us/um/people/lamport/pubs/lamport-mutual-solved.ps>The problem has been solved. something wrong with my LD_LIBRARAPATH changed it into LD_LIBRARY_PATH=.:$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib sorry for disturb * ** * 2010/8/16 sara bai <sar...@gm...> > hi : > > I got this error : > db = cx_Oracle.connect('sara', 'pswd', '192.168.1.100:1521/test_db') > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > cx_Oracle.InterfaceError: Unable to acquire Oracle environment handle > > > here is part of my .bashrc file at /home/sara/.bashrc > > export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client > > export PATH=$PATH:$ORACLE_HOME/bin > > export ORACLE_SID=XE > > export LD_LIBRARY_PATH=.:$ORACLE_HOME/lib:$LD_LIBRARY_PATH > > export SQLPATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/sqlplus > > > -------------------------------------------------------------------------------------- > when run sqlplus in cmd line > > $ sqlplus > > SP2-1503: Unable to initialize Oracle call interface > SP2-0152: ORACLE may not be functioning properly > > ----------------------------------------------------- > > /usr/lib/oracle/xe/app$ ll > > drwxrwxrwx 6 oracle dba 4096 2010-08-16 13:07 oracle > ----------------------------------------------------------- > > echo $PATH > > /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games:/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin > > > /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib$ ls > > libclntsh.so libheteroxa10.so libocci.so libocijdbc10.so > libsqlplusic.so libsqora.so.10.1 > libclntsh.so.10.1 libnnz10.so libocci.so.10.1 libocixe.so > libsqlplus.so > > > > > > i don't konw what's wrong with my cx_Orcale . need help ,thank you > > > > > |
From: sara b. <sar...@gm...> - 2010-08-16 06:59:47
|
hi : I got this error : db = cx_Oracle.connect('sara', 'pswd', '192.168.1.100:1521/test_db') Traceback (most recent call last): File "<stdin>", line 1, in <module> cx_Oracle.InterfaceError: Unable to acquire Oracle environment handle here is part of my .bashrc file at /home/sara/.bashrc export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client export PATH=$PATH:$ORACLE_HOME/bin export ORACLE_SID=XE export LD_LIBRARY_PATH=.:$ORACLE_HOME/lib:$LD_LIBRARY_PATH export SQLPATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/sqlplus -------------------------------------------------------------------------------------- when run sqlplus in cmd line $ sqlplus SP2-1503: Unable to initialize Oracle call interface SP2-0152: ORACLE may not be functioning properly ----------------------------------------------------- /usr/lib/oracle/xe/app$ ll drwxrwxrwx 6 oracle dba 4096 2010-08-16 13:07 oracle ----------------------------------------------------------- echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games:/usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/lib$ ls libclntsh.so libheteroxa10.so libocci.so libocijdbc10.so libsqlplusic.so libsqora.so.10.1 libclntsh.so.10.1 libnnz10.so libocci.so.10.1 libocixe.so libsqlplus.so i don't konw what's wrong with my cx_Orcale . need help ,thank you |
From: Chuck W. <chu...@ch...> - 2010-08-03 14:10:56
|
Are you suggesting that I try server 10.2 with client 11.1 OR server 10.2 with client 10.2 and 11.1? Thanks. ---- Anthony Tuininga <ant...@gm...> wrote: > Right. Can you try using 10.2 and 11.1 instant clients to see if the > problem occurs in those situations as well? What about using SQL*Plus? > Does the same problem occur there? Do you have a simple script that > can demonstrate the problem? Thanks. > > Anthony > > On Tue, Aug 3, 2010 at 7:28 AM, Chuck White <chu...@ch...> wrote: > > I am running into a similar problem. Here's the version info -- server:10.2.0.4.0, client:11.2.0.1.0, cx_Oracle:5.0.4 |
From: Anthony T. <ant...@gm...> - 2010-08-03 14:00:24
|
Right. Can you try using 10.2 and 11.1 instant clients to see if the problem occurs in those situations as well? What about using SQL*Plus? Does the same problem occur there? Do you have a simple script that can demonstrate the problem? Thanks. Anthony On Tue, Aug 3, 2010 at 7:28 AM, Chuck White <chu...@ch...> wrote: > I am running into a similar problem. Here's the version info -- server:10.2.0.4.0, client:11.2.0.1.0, cx_Oracle:5.0.4 > > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://p.sf.net/sfu/dev2dev-palm > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: Chuck W. <chu...@ch...> - 2010-08-03 13:47:28
|
I am running into a similar problem. Here's the version info -- server:10.2.0.4.0, client:11.2.0.1.0, cx_Oracle:5.0.4 |
From: Anthony T. <ant...@gm...> - 2010-07-28 13:38:59
|
Hi, My only thoughts are that you are using that cursor for some other queries besides the one shown here? Do you have threads running in this application and you forgot to turn on threaded mode? Besides those possibilities I can't think of anything else -- and the only time I run into that exception is when my sql and my bind variables don't match for some reason. It would be nice if Oracle told you __which__ bind variable it didn't like as that would aid in debugging the problem but unfortunately it does not. :-( Good luck! Anthony On Wed, Jul 28, 2010 at 4:08 AM, rwe <rog...@to...> wrote: > Hi, > I seem to be getting an ORA-01036 very occasionaly in some python code > using cx_Oracle: > > def updateJobState(self, job_id, job_state, job_pid): > try: > sql = """update jobs set job_state=:job_state, > job_pid=:job_pid where job_id=:job_id""" > self.cursor.execute(sql, job_id=job_id, job_state=job_state, > job_pid=job_pid) > self.commit() > except Exception: > self.reportException() > > I get the following error: > > DatabaseError: ORA-01036: illegal variable name/number > > As only the variable values change, I am at a loss as to where to look. > > I have the feeling it is when the database is very busy, although I > could be wrong... > > Any ideas ?? > > Thanks in advance.. > > Roger > > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://ad.doubleclick.net/clk;226879339;13503038;l? > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |
From: rwe <rog...@to...> - 2010-07-28 11:04:43
|
Hi, I have been chasing a similar problem. The same code runs on several constellations without problem, except for one where I get an excessove number of processes on the DB server. Killing the process gets rid of them. I will check to see what version of cx_Oracle, Oracle client and Oracle are in use, as I am pretty sure that it is a praticular combination that produces the problem. Roger -------- Original Message -------- Subject: Re: [cx-oracle-users] cx_Oracle opens an excessive number of sessions From: Anthony Tuininga <ant...@gm...> To: cx-...@li... Date: 22.07.2010 16:57 > Hi, > > I have never seen that behavior before and I have been using cx_Oracle > for well over a decade. Can you try the same thing with SQL*Plus? They > use the same base libraries so if there is a problem with the client > installation or other issue in your environment, that should show it > up. Perhaps try an older version of the instant client (11.1)? > Hopefully someone else may have seen this sort of behavior before and > can help you out further. > > Anthony > > On Thu, Jul 22, 2010 at 1:26 AM, Hannes Bretschneider > <hab...@gm...> wrote: > >> I have a problem using instantclient 11.2 and cx_Oracle 5.0.3. When I query >> the database, cx_Oracle creates an excessive number of sessions to the >> database (about 70). I already crashed the database once, because I went >> over the allowed number of sessions (Oracle default is 150), after which my >> sysadmin increased the number of allowed connections to about 4000. However, >> he tells me I have to reduce the amount of resources I use and the number of >> sessions, so he can set the allowed number of connections back to something >> reasonable once the server goes into production. >> The one thing I tried was to set cursor.arraysize to something smaller, but >> it doesn't make any difference. >> This is was happens: >> import cx_Oracle >> db = cx_Oracle.connect(user, pass, dsn) # Nothing bad happens here >> cursor = db.cursor() # This is fine too >> cursor.execute('SELECT foo FROM bar") # Opens an excessive number of >> sessions >> cursor.fetchone() # Read some records >> cursor.fetchmany() >> cursor.close() # Doesn't close the >> many sessions >> db.close() # Closes the >> sessions. >> --Hannes >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by Sprint >> What will you do first with EVO, the first 4G phone? >> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first >> _______________________________________________ >> cx-oracle-users mailing list >> cx-...@li... >> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users >> >> >> > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > > > |
From: rwe <rog...@to...> - 2010-07-28 10:35:31
|
Hi, I seem to be getting an ORA-01036 very occasionaly in some python code using cx_Oracle: def updateJobState(self, job_id, job_state, job_pid): try: sql = """update jobs set job_state=:job_state, job_pid=:job_pid where job_id=:job_id""" self.cursor.execute(sql, job_id=job_id, job_state=job_state, job_pid=job_pid) self.commit() except Exception: self.reportException() I get the following error: DatabaseError: ORA-01036: illegal variable name/number As only the variable values change, I am at a loss as to where to look. I have the feeling it is when the database is very busy, although I could be wrong... Any ideas ?? Thanks in advance.. Roger |
From: D.R. B. <da...@as...> - 2010-07-28 08:33:19
|
Hoi Chuck, Although it's not using cx_Oracle, you might want to try Oracle SQL Developer http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html It will allow you to export to .csv quickly and - if you're lucky - it may even allow you to migrate your data to Netezza directly. If you have a Netezza jdbc driver and it works it's probably the simplest and fastest way to copy your data. Good luck, Danny On Tue, Jul 27, 2010 at 04:56:16PM -0400, Chuck White wrote: > Thanks again for your response and code. We do have a view called all_tab_cols. The issue I am running into is for some of our tables have 3billion+ records and 80+columns. It is taking 10+mins to compute the max on one column. > > It is trivial to generate SQL which will get the information for all columns: > > select min(sz.fld1), max(sz.fld1), min(sz.fld2), max(sz.fld2), ... > from > ( > select length(to_char(fld1)) fld1, length(fld2) fld2, ... > from tbl1 > ) sz > appropriately depending on the type. > > Is there an alternative/cleaner approach? Thanks. > > ---- Anthony Tuininga <ant...@gm...> wrote: > > Sure. You want something like this -- untested but it should give you > > the right idea. > > > > connection = cx_Oracle.Connection(....) > > columnCursor = connection.cursor() > > queryCursor = connection.cursor() > > columnCursor.execute(""" > > select table_name, column_name, data_type > > from user_tab_columns > > order by table_name, column_id""") > > for tableName, columnName, dataType in columnCursor: > > if dataType in ("CHAR", "VARCHAR2"): > > selectItem = "length(%s)" % columnName > > elif dataType == "NUMBER": > > selectItem = "length(to_char(%s)) % columnName > > else: > > continue > > queryCursor.execute("select max(%s) from %s" % (selectItem, tableName)) > > result, = queryCursor.fetchone() > > print "Maximum length for %s.%s is %s" % (tableName, columnName, result) > > > > Anthony > > > > On Mon, Jul 26, 2010 at 10:46 AM, Chuck White <chu...@ch...> wrote: > > > Thanks for your response. Can you please send me examples which query those tables (user_tab_columns, all_tab_columns or dba_tab_columns)? > > > > > > ---- Anthony Tuininga <ant...@gm...> wrote: > > >> Hi, > > >> > > >> Just a suggestion: avoid the parsing completely if you can do it. If > > >> all you're trying to do is calculate the maximum size of fields, you > > >> can easily write something that does this: > > >> > > >> select max(length(<COL_NAME>)) from <TABLE_NAME> > > >> > > >> or for numbers > > >> > > >> select max(length(to_char(<COL_NAME>)) from <TABLE_NAME> > > >> > > >> This sort of query is far more efficient and can be done independently > > >> of your extracts. You can quite easily generate all of these queries > > >> by reading from user_tab_columns, all_tab_columns or dba_tab_columns. > > >> If you need help with that, let me know. > > >> > > >> Anthony > > > > > > > > > ------------------------------------------------------------------------------ > The Palm PDK Hot Apps Program offers developers who use the > Plug-In Development Kit to bring their C/C++ apps to Palm for a share > of $1 Million in cash or HP Products. Visit us here for more details: > http://ad.doubleclick.net/clk;226879339;13503038;l? > http://clk.atdmt.com/CRS/go/247765532/direct/01/ > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users |
From: Chuck W. <chu...@ch...> - 2010-07-27 20:56:24
|
Thanks again for your response and code. We do have a view called all_tab_cols. The issue I am running into is for some of our tables have 3billion+ records and 80+columns. It is taking 10+mins to compute the max on one column. It is trivial to generate SQL which will get the information for all columns: select min(sz.fld1), max(sz.fld1), min(sz.fld2), max(sz.fld2), ... from ( select length(to_char(fld1)) fld1, length(fld2) fld2, ... from tbl1 ) sz appropriately depending on the type. Is there an alternative/cleaner approach? Thanks. ---- Anthony Tuininga <ant...@gm...> wrote: > Sure. You want something like this -- untested but it should give you > the right idea. > > connection = cx_Oracle.Connection(....) > columnCursor = connection.cursor() > queryCursor = connection.cursor() > columnCursor.execute(""" > select table_name, column_name, data_type > from user_tab_columns > order by table_name, column_id""") > for tableName, columnName, dataType in columnCursor: > if dataType in ("CHAR", "VARCHAR2"): > selectItem = "length(%s)" % columnName > elif dataType == "NUMBER": > selectItem = "length(to_char(%s)) % columnName > else: > continue > queryCursor.execute("select max(%s) from %s" % (selectItem, tableName)) > result, = queryCursor.fetchone() > print "Maximum length for %s.%s is %s" % (tableName, columnName, result) > > Anthony > > On Mon, Jul 26, 2010 at 10:46 AM, Chuck White <chu...@ch...> wrote: > > Thanks for your response. Can you please send me examples which query those tables (user_tab_columns, all_tab_columns or dba_tab_columns)? > > > > ---- Anthony Tuininga <ant...@gm...> wrote: > >> Hi, > >> > >> Just a suggestion: avoid the parsing completely if you can do it. If > >> all you're trying to do is calculate the maximum size of fields, you > >> can easily write something that does this: > >> > >> select max(length(<COL_NAME>)) from <TABLE_NAME> > >> > >> or for numbers > >> > >> select max(length(to_char(<COL_NAME>)) from <TABLE_NAME> > >> > >> This sort of query is far more efficient and can be done independently > >> of your extracts. You can quite easily generate all of these queries > >> by reading from user_tab_columns, all_tab_columns or dba_tab_columns. > >> If you need help with that, let me know. > >> > >> Anthony > > > > |
From: Weber, G. <Geo...@PA...> - 2010-07-26 20:27:37
|
Sounds great to me! I'd be in favor of exposing this as it's caused me headaches in the past, especially in Perl with DBD::Oracle. >> If you (i) can't use ping (ii) find its internal implementation >> doesn't catch everything you classify as a connection error (iii) or >> don't want to use it because it causes a roundtrip to the DB and hence >> reduces scalability, then you could try explicitly testing error >> codes. A fairly good set of codes to identify if an error is a >> connection error is given in the PHP_OCI_HANDLE_ERROR macro used by >> PHP error checking. See >> http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/ext/oci8/php_oci8_int.h?view=markup >> There's an OCI attribute check (also used in PHP_OCI_HANDLE_ERROR) >> that does this test but cx_Oracle doesn't expose it. >That can be fixed. :-) >Just to be clear: this attribute is only set __after__ an attempt is >made to access the server. So at that point the typical solution would >be: >try: > cursor.execute(some_sql) >except cx_Oracle.DatabaseError: > if cursor.connection.connected: > raise > print "*** Server not connected: do something about it!" >The other option is to check this attribute when the error is being >created and store it on the error object instead -- but I suspect >exposing the object on the connection will be more flexible. Comments >anyone? I think you're right here, Anthony - having it be part of the connection object would probably make it more flexible, but since it's only set after the attempt to access the server, maybe using the error object still makes more sense? I guess I can see it set in either location, but it might make more sense to understand the actual functionality better if it was part of the error object. Or maybe you can expose it in both places? I guess I'm not helping much, but those were my quick thoughts on the matter. In the case of using the error object though, then would something like the following work? Maybe it's too cumbersome... try: cursor.execute(some_sql) except (cx_Oracle.ConnectionError, cx_Oracle.DatabaseError) as e: if ( isinstance(e, cx_Oracle.ConnectionError) ): print '*** Server not connected: Do something about it! ***' else: # other error handling Thanks! Geoff |