用python串連oracle(11g)資料庫,python11g

來源:互聯網
上載者:User

用python串連oracle(11g)資料庫,python11g
準備:1、下載對應版本的oracle-instantclient(我這裡是11.2.0.1.0)

http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
2、安裝
rpm -ivh oracle-instantclient11.2-basic-11.2.0.1.0-1.x86_64.rpm
3、配置環境變數
export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib:$LD_LIBRARY_PATHexport PATH=/usr/lib/oracle/11.2/client64/bin:$PATH
4、開始你的開發(我們用python)開發:python串連oracle資料庫需要cx_Oracle1、下載
http://sourceforge.net/projects/cx-oracle/
2、安裝

我下載rpm包,安裝很簡單

rpm -ivh cx_Oracle-5.1.2-11g-py26-1.x86_64.rpm
3、開始你的開發吧
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>>>

相關文章

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.