Thread: [cx-oracle-users] Version mismatch ?
Brought to you by:
atuining
From: <sch...@sk...> - 2013-02-18 15:19:49
|
undefined |
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: 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: 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() |