웹 기술 쌈싸먹기/Python
2021. 12. 22.
Python - cx_Oracle 연동 예제
Python - cx_Oracle 연동 예제 # 오라클 연동 import cx_Oracle # 운영체제의 한글 맞추기 import os # 파이썬 데이터 한글처리 os.environ["NLS_LANG"] = ".UTF8" # 연결 객체 - DB 연결정보는 언어마다 확인 # id, passwd, hostname/[sid 또는 servicename] connect = cx_Oracle.connect("heesung", "heesung", "localhost:1521/xe") cur = connect.cursor() # DB 연결 버전정보 print('{}'.format(connect.version)) # 참고 - https://stackoverflow.com/questions/35045879/cx-oracl..