<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>GreenO &#187; Oracle Python Red Hat Enterprise Linux cx_Oracle</title>
	<atom:link href="http://blog.chrisgreenough.com/tag/oracle-python-red-hat-enterprise-linux-cx_oracle/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.chrisgreenough.com</link>
	<description>GreenO from Technical to Personal and everything in between!</description>
	<lastBuildDate>Wed, 18 Jan 2012 18:45:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Oracle, Python, and Red Hat Enterprise Linux 4 using cx_Oracle</title>
		<link>http://blog.chrisgreenough.com/2009/10/oracle-python-and-red-hat-enterprise-linux-4-using-cx_oracle/</link>
		<comments>http://blog.chrisgreenough.com/2009/10/oracle-python-and-red-hat-enterprise-linux-4-using-cx_oracle/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 23:34:33 +0000</pubDate>
		<dc:creator>GreenO</dc:creator>
				<category><![CDATA[Technobabble]]></category>
		<category><![CDATA[Oracle Python Red Hat Enterprise Linux cx_Oracle]]></category>

		<guid isPermaLink="false">http://blog.chrisgreenough.com/?p=78</guid>
		<description><![CDATA[fter a bunch of trial and error, the following packages are needed to Install <a href="http://cx-oracle.sourceforge.net/">cx_Oracle</a> for Python and the required Oracle Instant Client for Red Hat Enterprise Linux 4. Its not that this is too difficult, its that RHEL4 is old. Getting the two to place nice took a sec to figure out. This will install cx_Oracle for python that comes with RHEL4, which as of this writing is Python version 2.3.4 for Red Hat Enterprise Linux AS release 4 (Nahant Update 8). I am sure you can use the newer libraries with the a new install of Python, but I wanted to stay as close as possible to the versions supported by Red Hat. For better for worse! ;-)]]></description>
			<content:encoded><![CDATA[<p>After a bunch of trial and error, the following packages are needed to Install <a href="http://cx-oracle.sourceforge.net/">cx_Oracle</a> for Python and the required Oracle Instant Client for Red Hat Enterprise Linux 4. Its not that this is too difficult, its that RHEL4 is old. Getting the two to place nice took a sec to figure out. This will install cx_Oracle for python that comes with RHEL4, which as of this writing is Python version 2.3.4 for Red Hat Enterprise Linux AS release 4 (Nahant Update 8). I am sure you can use the newer libraries with the a new install of Python, but I wanted to stay as close as possible to the versions supported by Red Hat. For better for worse! <img src='http://blog.chrisgreenough.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>1. Download the cx_Oracle library.<br />
	wget http://prdownloads.sourceforge.net/cx-oracle/cx_Oracle-4.3.1-10g-py23-1.i386.rpm?download</p>
<p>2. Install cx_Oracle<br />
	rpm -i cx_Oracle-4.3.1-10g-py23-1.i386.rpm</p>
<p>3. Download Oracle Instant Client from the URL below. Must be logged in so do this from a browser.</p>
<p>http://download.oracle.com/otn/linux/instantclient/10204/oracle-instantclient-basiclite-10.2.0.4-1.i386.rpm</p>
<p>4. Install Oracle Instant Client<br />
	rpm -i oracle-instantclient-basic-10.2.0.4-1.i386.rpm</p>
<p>5. Add the path to the instant client libs to LD_LIBRARY_PATH.<br />
	echo &#8220;export LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.4/client/lib/:\$LD_LIBRARY_PATH&#8221; >> /etc/profile</p>
<p>Thats it! Want to be sure?</p>
<p><code>[xyz@pdq ~]$ python2<br />
Python 2.3.4 (#1, Jul 16 2009, 07:01:37)<br />
[GCC 3.4.6 20060404 (Red Hat 3.4.6-11)] on linux2<br />
Type "help", "copyright", "credits" or "license" for more information.<br />
>>> import cx_Oracle<br />
>>> oraConn=cx_Oracle.Connection("username/password@server/SqlNetAlias")<br />
>>> curs = oraConn.cursor()<br />
>>> curs.execute("select 1 from dual")<br />
[<cx_Oracle.NUMBER with value None>]<br />
>>> rows = curs.fetchmany(curs.arraysize)<br />
>>> for row in rows:<br />
...     print row[0]<br />
...<br />
1<br />
>>> oraConn.close()<br />
>>> </code></p>
<p>The more I learn about cx_Oracle and Python I will try to update this space. All I know right now is that it is FAST! </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.chrisgreenough.com/2009/10/oracle-python-and-red-hat-enterprise-linux-4-using-cx_oracle/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.304 seconds -->

