Connect to the oracle (11g) database using python, python11g

Source: Internet
Author: User

Connect to the oracle (11g) database using python, python11g
Preparation: 1. Download the corresponding version of oracle-instantclient (I am here 11.2.0.1.0)

http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
2. Installation
rpm -ivh oracle-instantclient11.2-basic-11.2.0.1.0-1.x86_64.rpm
3. Configure Environment Variables
export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib:$LD_LIBRARY_PATHexport PATH=/usr/lib/oracle/11.2/client64/bin:$PATH
4. Start your development (we use python) Development: To connect python to the oracle database, cx_Oracle1 is required. Download
http://sourceforge.net/projects/cx-oracle/
2. Installation

I downloaded the rpm package, which is easy to install.

rpm -ivh cx_Oracle-5.1.2-11g-py26-1.x86_64.rpm
3. Start your development
Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36) [GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import cx_Oracle>>>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.