I am having an issue to connect my C++ application to my Oracle DB,I get an error
"[OracleException] errcode: 1804, desc: Error while trying to retrieve text for error ORA-01804".
I am having an issue to connect my C++ application to my Oracle DB,I get an error
"[OracleException] errcode: 1804, desc: Error while trying to retrieve text for error ORA-01804".
You are receiving ORA-01804
by the database, the description of ORA-01804
is:
failure to initialize timezone information
Cause: The timezone information file was not properly read.
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):
setx ORACLE_HOME "C:\oracle\oc121\"
On some of the DB connections TNS_ADMIN is required also set that as well:
setx TNS_ADMIN "%ORACLE HOME%\network\admin"
I use OCCI in CentOS 7, and encounter the same issue, just add libociicus.so to LD_LIBRARY_PATH to resolve the issue.
I was experiencing such trouble with C++ OCCI application which caught oracle::occi::SQLException
when it was trying to connect to 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_HOME
directory.
The solution was to simply copy those files from another instance of oracle client.
You are receiving ORA-01804
by the database, the description of ORA-01804
is:
failure to initialize timezone information
Cause: The timezone information file was not properly read.
In my case, libociicus.so
library was missing. It can be found in Oracle Instant Client.
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.
I know this is an old question, but there are no answers can fix my case (oracledb package of nodejs, macOS).
but, again, I found a solution for myself.
The solution is that move libociei.dylib
into /usr/locale/lib
folder. That's it.
LD_LIBRARY_PATH
accordingly. The main change nowadays, and why your answer hints towards the right solution, is that the missing library mentioned in older answers seems to have been replaced by libociei
which currently measures a hefty 137MB alone. No idea what Oracle does, but it's definitely obscene to have such a huge library dependencies to simply invoke sqlplus
to quickly bootstrap some SQL scripts. –
Kinghorn The following isn't really a good solution. I'm not sure myself what made the deal. But for me the solution was to:
After that the error was gone
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.
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.
So: check that installation folder contains all required files!
For me, it's because the version of my instant client and the database server is using a different version. So I had to match their version to solve this error. Apparently, Oracle can't read the DB timezone if their version is different.
© 2022 - 2024 — McMap. All rights reserved.