环境:
Win10 +pycharm+cx_oracle 都是64位
错误信息:
cx_Oracle.DatabaseError: Error while trying to retrieve text for error ORA-01804
解决步骤:
1. ORACLE_HOME and PATH already set. pls refer to https://www.cnblogs.com/tingxin/p/12676580.html
2. copy oracle 服务器上ORALCE_HOME/oracore 文件夹到win10 ORACLE_HOME 文件夹.
select value$ "Time Zone Version" from PROPS$ where name='DST_PRIMARY_TT_VERSION'; Time Zone Version -------------------------------------------------------------------------------- 32
3.此时出现问题
cx_Oracle.DatabaseError: DPI-1072: the Oracle Client library version is unsupported;
copy 以下oracle client dll to python.exe 目录
D:Program FilesPython37>dir o*.dll Volume in drive D is Database Volume Serial Number is F220-1E0F Directory of D:Program FilesPython37 05/01/2020 02:22 pm 807,424 oci.dll 15/11/2019 06:59 pm 182,272 ocijdbc19.dll 05/01/2020 01:56 pm 612,352 ociw32.dll 05/01/2020 01:42 pm 88,576 oramysql19.dll 21/08/2019 05:35 am 4,762,112 orannzsbb19.dll 05/01/2020 01:10 pm 1,149,952 oraocci19.dll 05/01/2020 01:34 pm 1,163,776 oraocci19d.dll 05/01/2020 02:25 pm 205,559,808 oraociei19.dll 15/11/2019 07:48 pm 288,768 oraons.dll 05/01/2020 02:17 pm 232,448 orasql19.dll 15/11/2019 07:19 pm 1,659,392 orasqlplusic19.dll 11 File(s) 216,506,880 bytes 0 Dir(s) 195,699,912,704 bytes free
refer:https://docs.oracle.com/health-sciences/cis/installation-guide/index.htm?toc.htm?213990.htm