安装Oracle,并通过python连接Oracle,插入数据

一、安装cx_Oracle

pip install cx_Oracle

二、安装instantclient

windows方式:

https://www.oracle.com/technetwork/database/database-technologies/instant-client/downloads/index.html

第一次使用需要注册即可下载资源

1.下载windows对应配置的即可,我这里下载的是instantclient_11_2

2.环境配置

import os
os.environ['NLS_LANG'] = 'SIMPLIFIED CHINESE_CHINA.UTF8'
os.environ['TNS_ADMIN'] = 'D:\program\instantclientx64_jb51\instantclient_11_2'
os.environ['Path'] = 'D:\program\instantclientx64_jb51\instantclient_11_2'

linux方式:

https://www.oracle.com/technetwork/database/database-technologies/instant-client/down

猜你喜欢

转载自blog.csdn.net/as4589sd/article/details/104096478