SSISO Community

시소당

python oracle 10g 연동

파이썬과 오라클 연동은 아주 간단했다.

하지만, 몰라서 3시간 삽질했다 -_-;;

나의 검색 능력을 의심 中..

1. 파이썬 설치

2. CX-Oracle 설치
다운로드 : http://www.cxtools.net/default.aspx?nav=cxorlb
참고 : http://www.python.net/crew/atuining/cx_Oracle/README.txt

# tar xzvf cx_Oracle-4.2.tar.gz
# cd cx_Oracle-4.2
# python setup.py build
# python setup.py install

끝 -_   -;

3. db_test.py
import cx_Oracle

connection = cx_Oracle.connect("id", "pass", "ora10")
cursor = connection.cursor()
cursor.execute("SELECT count(*) FROM MEMBER");
print cursor.fetchall()
cursor.close()파이썬과 오라클 연동은 아주 간단했다.

하지만, 몰라서 3시간 삽질했다 -_-;;

나의 검색 능력을 의심 中..

1. 파이썬 설치

2. CX-Oracle 설치
다운로드 : http://www.cxtools.net/default.aspx?nav=cxorlb
참고 : http://www.python.net/crew/atuining/cx_Oracle/README.txt

# tar xzvf cx_Oracle-4.2.tar.gz
# cd cx_Oracle-4.2
# python setup.py build
# python setup.py install

끝 -_   -;

3. db_test.py
import cx_Oracle

connection = cx_Oracle.connect("id", "pass", "ora10")
cursor = connection.cursor()
cursor.execute("SELECT count(*) FROM MEMBER");
print cursor.fetchall()
cursor.close()

출처 : http://kineo2k.tistory.com/115

2665 view

4.0 stars