ORA-01804 error while trying to load “Oracle” dbDriver

不羁岁月 提交于 2019-12-02 07:37:41

You have to check those 2 points:

  • ORACLE_HOME environment variable must be defined
  • $ORACLE_HOME/lib path must be in LD_LIBRARY_PATH environment variable value

For example, if your ORACLE_HOME is /usr/lib/oracle/12.1/client64 (which is the default in Oracle Instant Client installation with the official .rpm), execute the following R commands:

Sys.setenv("ORACLE_HOME" = "/usr/lib/oracle/12.1/client64")
Sys.getenv("LD_LIBRARY_PATH")
# Here check if /usr/lib/oracle/12.1/client64/lib is a part (separated by ":" of the result)
# else, append ":/usr/lib/oracle/12.1/client64/lib" to the result and set the environment variable using:
# Sys.setenv("LD_LIBRARY_PATH" = "/all/the/result:/of/getenv/command:/usr/lib/oracle/12.1/client64/lib")

ORA-01804: failure to initialize timezone information Cause: The timezone information file was not properly read.

The reason was that my linux oracle client was missing some timezone related files in its $ORACLE_HOME directory. The solution was to simply copy those files from another instance of oracle client.

This is a generic error message from the Oracle Database indicating that the timezone information file was not properly read. Below are the most common solutions:

1) Your oracle client may be missing some timezone related files in its$ORACLE_HOMEdirectory. You can try simply copying those files from another instance of oracle client.

2) Binary may not have permission to access the OCCI library. Please ensure permissions are in correctly in place.

3) Check to make sure the following paths are set correctly in your environment: LD_LIBRARY_PATH ORACLE_HOME NLS_LANG

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!