oracle 尝试检索错误 ORA-01804 的文本时出错

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12837811/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 04:33:01  来源:igfitidea点击:

Error while trying to retrieve text for error ORA-01804

oracle

提问by travaller2

I am having an issue to connect my C++ application to my Oracle DB,I get an error

我在将 C++ 应用程序连接到 Oracle DB 时遇到问题,出现错误

"[OracleException] errcode: 1804, desc: Error while trying to retrieve text for error ORA-01804".

"[OracleException] errcode: 1804, desc: Error while trying to retrieve text for error ORA-01804".

采纳答案by Anshu

You are receiving ORA-01804by the database, the description of ORA-01804is:

你是ORA-01804数据库接收的,描述ORA-01804是:

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

回答by Teddy Zhu

I use OCCI in CentOS 7, and encounter the same issue, just add libociicus.so to LD_LIBRARY_PATH to resolve the issue.

我在 CentOS 7 中使用 OCCI,遇到同样的问题,只需将 libociicus.so 添加到 LD_LIBRARY_PATH 即可解决问题。

回答by Alex InTechno

I was experiencing such trouble with C++ OCCI application which caught oracle::occi::SQLExceptionwhen it was trying to connect to oracle db.

我在使用 C++ OCCI 应用程序oracle::occi::SQLException时遇到了这样的问题,它在尝试连接到 oracle db 时被捕获。

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_HOMEdirectory. The solution was to simply copy those files from another instance of oracle client.

原因是我的 linux oracle 客户端在其$ORACLE_HOME目录中缺少一些与时区相关的文件。解决方案是简单地从另一个 oracle 客户端实例复制这些文件。

回答by SergiyKolesnikov

In my case, libociicus.so(can be found in the Oracle Instant Client) was missing.

就我而言,libociicus.so(可以在Oracle Instant Client 中找到)丢失了。

回答by LiJunjie

Another possible reason: Binary have no permission to access the OCCI library ... I encounter such situation due to my mistakenly setting mode of folder in which OCCI library is.

另一个可能的原因:Binary没有访问OCCI库的权限……我遇到这种情况是因为我错误地设置了OCCI库所在文件夹的模式。

回答by Gorkem

I got the same error for cx_oracle (via python). For this specific case ORACLE_HOME was missing in environment variables. Set Oracle_home with Windows Cli (use your oracle folder):

对于 cx_oracle(通过 python),我遇到了同样的错误。对于这种特定情况,环境变量中缺少 ORACLE_HOME。使用 Windows Cli 设置 Oracle_home(使用您的 oracle 文件夹):

setx ORACLE_HOME  "C:\oracle\oc121\"

On some of the DB connections TNS_ADMIN is required also set that as well:

在某些数据库连接上,还需要设置 TNS_ADMIN:

setx TNS_ADMIN "%ORACLE HOME%\network\admin"

回答by Konrad

Another trivial yet hard to determine cause for this might be that Oracle installation folder is incomplete. For me, a reason for this was that some process just (unsuccessfully) uninstalled Oracle client.

另一个微不足道但难以确定的原因可能是 Oracle 安装文件夹不完整。对我来说,原因是某些进程(未成功)卸载了 Oracle 客户端。

It was really tricky as bin folder from PATH env. var contained oci.dll (and lots of other DLL-s), but elsewhere under C:\oracle\11\there were other files missing.

作为 PATH env 中的 bin 文件夹,这真的很棘手。var 包含 oci.dll(以及许多其他 DLL-s),但在其他地方C:\oracle\11\还缺少其他文件。

So: check that installation folder contains all required files!

所以:检查安装文件夹是否包含所有必需的文件!