473,574 Members | 2,511 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Accessing Oracle from Python

Hi,

I've been down so many dead ends trying to get something working, so
I'm really hoping someone can help out.

I need to access an Oracle database running on a Windows server from
Python running on Linux. I've tried building DCOracle2, but it seems
that the 'oracle-installclient-basic' thing I downloaded from the
Oracle site doesn't contain enough. I've tried various other
approaches, such as mxODBC/iODBC, but without much luck. I'm hoping to
not have to resort to a Windows solution.

Can someone help me figure out what combination of Python module,
Oracle download and/or ODBC driver will work?

Thanks,
Dan.

--
Dan Ellis, Computer Officer
North Lindsey College
Jul 18 '05 #1
6 2345
You don't want to use ODBC as that is a Windows interface
that doesn't natively exist on Linux. You can purchase
Linux ODBC interfaces from companies like EasySoft, but
if your program is running on Linux you will be much better
off with a native interface. ODBC overhead is quite large
and should be avoided whenever possible. You didn't say
which version of Oracle, but for 7 and 8 you can use

http://www.zope.org/Products/DCOracle/

8i and above can be accessed using

http://www.zope.org/Members/matt/dco2/

Access to remote Oracle databases is just done via TCP
connections.

Note: Our experience is that Oracle runs MUCH better
on Linux than Windows (as much as 5 times faster on
equivalent hardware). Are you sure you want the database
on Windows?

HTH,
Larry Bates
Syscon, Inc.

"Dan Ellis" <us****@electri cwords.org> wrote in message
news:bf******** *************** ***@posting.goo gle.com...
Hi,

I've been down so many dead ends trying to get something working, so
I'm really hoping someone can help out.

I need to access an Oracle database running on a Windows server from
Python running on Linux. I've tried building DCOracle2, but it seems
that the 'oracle-installclient-basic' thing I downloaded from the
Oracle site doesn't contain enough. I've tried various other
approaches, such as mxODBC/iODBC, but without much luck. I'm hoping to
not have to resort to a Windows solution.

Can someone help me figure out what combination of Python module,
Oracle download and/or ODBC driver will work?

Thanks,
Dan.

--
Dan Ellis, Computer Officer
North Lindsey College

Jul 18 '05 #2
Dan Ellis wrote:
Hi,

[...]

I need to access an Oracle database running on a Windows server from
Python running on Linux. I've tried building DCOracle2, but it seems
that the 'oracle-installclient-basic' thing I downloaded from the
Oracle site doesn't contain enough. I've tried various other
approaches, such as mxODBC/iODBC, but without much luck. I'm hoping to
not have to resort to a Windows solution.

Can someone help me figure out what combination of Python module,
Oracle download and/or ODBC driver will work?


Try cx_Oracle:
http://www.computronix.com/utilities.shtml#Oracle
(and of course you need an Oracle client installation on your Linux
machine)

HTH,
Walter Dörwald

Jul 18 '05 #3
Dan Ellis wrote:
Hi,

[...]

I need to access an Oracle database running on a Windows server from
Python running on Linux. I've tried building DCOracle2, but it seems
that the 'oracle-installclient-basic' thing I downloaded from the
Oracle site doesn't contain enough. I've tried various other
approaches, such as mxODBC/iODBC, but without much luck. I'm hoping to
not have to resort to a Windows solution.

Can someone help me figure out what combination of Python module,
Oracle download and/or ODBC driver will work?


Try cx_Oracle:
http://www.computronix.com/utilities.shtml#Oracle
(and of course you need an Oracle client installation on your Linux
machine)

HTH,
Walter Dörwald
Jul 18 '05 #4
Larry Bates wrote:
You don't want to use ODBC as that is a Windows interface
that doesn't natively exist on Linux. You can purchase
Linux ODBC interfaces from companies like EasySoft, but
if your program is running on Linux you will be much better
off with a native interface. ODBC overhead is quite large
and should be avoided whenever possible.


I don't quite agree with this statement: it's an old myth
that was based on poor ODBC drivers. If you connect to a
database over a network, the network latency is what matters,
not the additional layering you do on the client or server.

ODBC gives you much more flexibility in terms of setting up
your database client - server and backend structure.

Tools like mxODBC let you tap into this flexibility from
Windows, Linux, Solaris, AIX, etc. with the additional
benefit of having to only write against one API for all
databases and on all platforms.

--
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source (#1, Jul 16 2004)
Python/Zope Consulting and Support ... http://www.egenix.com/
mxODBC.Zope.Dat abase.Adapter ... http://zope.egenix.com/
mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/

_______________ _______________ _______________ _______________ ____________

::: Try mxODBC.Zope.DA for Windows,Linux,S olaris,FreeBSD for free ! ::::
Jul 18 '05 #5
Dan Ellis wrote:
Hi,

I've been down so many dead ends trying to get something working, so
I'm really hoping someone can help out.

I need to access an Oracle database running on a Windows server from
Python running on Linux. I've tried building DCOracle2, but it seems
that the 'oracle-installclient-basic' thing I downloaded from the
Oracle site doesn't contain enough. I've tried various other
approaches, such as mxODBC/iODBC, but without much luck. I'm hoping to
not have to resort to a Windows solution.

Can someone help me figure out what combination of Python module,
Oracle download and/or ODBC driver will work?


The EasySoft Oracle drivers works nicely with mxODBC/unixODBC.
Other vendors of ODBC drivers for Oracle are: DataDirect,
OpenLink and a few others:

http://www.sqlsummit.com/ODBCVend.htm

There's also an open-soruce Oracle ODBC driver:

http://fndapl.fnal.gov/~dbox/oracle/odbc/

Naturally, the EasySoft driver works best with unixODBC and
the OpenLink one with iODBC (simply because those two companies
took over development of these ODBC managers).

--
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source (#1, Jul 16 2004)
Python/Zope Consulting and Support ... http://www.egenix.com/
mxODBC.Zope.Dat abase.Adapter ... http://zope.egenix.com/
mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/

_______________ _______________ _______________ _______________ ____________

::: Try mxODBC.Zope.DA for Windows,Linux,S olaris,FreeBSD for free ! ::::
Jul 18 '05 #6
Thanks to everyone who replied. I finally managed to get cx_Oracle
built against Oracle 9i, and it's now working sweeter than a sweet
thing with extra sugar on.
Jul 18 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3482
by: duikboot | last post by:
Hi all, I'm trying to export a view tables from a Oracle database to a Mysql database. I create insert statements (they look alright), but it all goes wrong when I try to execute them in Mysql, because the dates must have quotes on each side. I just don't know how make the dates right. Well I'll just show you the code and some insert...
1
5229
by: Benson, John | last post by:
Hi, I'm a non-Oracle guy just starting to use Python to explore Oracle. I enclose the Python command prompt log for the usage example further down with only the user, password and host names changed to keep me out of trouble. But first, I'd like to point out that I'm able to logon to myhost, and get into the following via SQL*Plus using...
4
2790
by: Greg Lindstrom | last post by:
Greetings- I am running Python 2.3.3 on HP-UX and would like to access an Oracle 9i database. Looking through the vaults, I see 4 or 5 modules that might work and was wondering if anyone is currently hitting Oracle and what are you using. I get to build a new system from the ground up and the powers that be are allowing me to do it in...
1
16137
by: majk | last post by:
hey! Im looking for a db tutoral which covers accessing a Microsoft SQL database on windows. I will be using VC++ if it matters. NO details just a basic introduction! Oracle DB access using C++ is also of interest! Thanks!
10
3511
by: Andrea M. Segovia | last post by:
Hello, I am a newbie to Oracle databases.... We have a visualization front-end tool connected to an Oracle back-end database on a Tru64 UNIX server. We also have clients with MS access databases who would like to share their data using this visualization tool but do not want to import their data into the Oracle server back-end.
6
4333
by: Jeff | last post by:
Has anyone had any luck accessing an Oracle database from a web service? I have a C# DLL with various code to query an Oracle database. If I call the methods in this DLL from a Windows Forms application everything works just fine. However, if I call the methods in this DLL from a web service, I receive the following error when the database...
2
1983
by: Neo | last post by:
Hi Everyone I am trying to acces Oracle using oracle client classes provided by .net in an asp .net application. But I keep on getting following error "System.Data.OracleClient requires Oracle client software version 8.1.7 " All the solutions mentioned to this problem on various newsgroups indicate a setting in security permission. I have...
2
4066
by: Mark Brown | last post by:
I'm trying to access an Oracle database vb.net. I found several examples. I tried following each one, but I get the same error no matter what I try. I don't really understand what the error means (I've never tried accessing an Oracle database before). The error I get is: ORA-12514: TNS:listener does not currently know of service requested...
8
14300
by: =?Utf-8?B?RGF2aWQrKw==?= | last post by:
Hi, I have been developing Web Services in VS2005. Usually I use the built in server in VS2005 to test and develop the Web Service. However I now want to make this Web Service available to other computers (and applications) in our local company network. When the service runs it accesses an Oracle database and pulls some data out. It...
0
8241
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7820
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8100
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3742
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3753
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2249
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1344
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1061
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.