1. 程式人生 > >Python操作Oracle

Python操作Oracle

rac clntsh 2.6 pro python oracl rpm 1-1 ...


[[email protected] pythonsoftware]# rpm -ivh oracle-instantclient-basic-11.1.0.1-1.x86_64.rpm
Preparing... ########################################### [100%]
1:oracle-instantclient-ba########################################### [100%]
[[email protected] pythonsoftware]# rpm -ivh cx_Oracle-5.3-11g-py26-2.x86_64.rpm
Preparing... ########################################### [100%]
1:cx_Oracle ########################################### [100%]
[[email protected] pythonsoftware]# cp /opt/oracle/11g/lib/libnnz11.so /usr/lib/python2.6/site-packages/
[[email protected] pythonsoftware]# cp /opt/oracle/11g/lib/libclntsh.so.11.1 /usr/lib/python2.6/site-packages/
[[email protected] pythonsoftware]# cp /usr/lib/oracle/11.1.0.1/client64/lib/libociei.so /usr/lib/python2.6/site-packages/

####ln -s /home/oracle/app/oracle/product/11.2.0/dbhome_1/lib/libclntsh.so.11.1 libclntsh.so.11.1

vim /etc/ld.so.conf.d/oracle.conf
/usr/lib/oracle/11.1.0.1/client64/lib
ldconfig

Python操作Oracle