Error while trying to retrieve text for error ORA-01804
Asked Answered
H

10

11

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".

Highflier answered 11/10, 2012 at 10:46 Comment(0)
O
3

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.
Optometrist answered 11/10, 2012 at 10:48 Comment(2)
I am getting the same error can you please elaborate how you were able to solve it. Thanks!Knitted
There is no RCA and fix for this issueFellows
G
9

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"
Gabardine answered 13/2, 2019 at 11:52 Comment(0)
G
5

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

Gustavogustavus answered 22/8, 2018 at 1:58 Comment(1)
Indeed, libociicus.so solves two problems. (1) the missing timezone file (2) the missing text for ORA-01804.Ursi
W
4

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.

Whiny answered 4/4, 2013 at 17:14 Comment(1)
Can you please specify the missing filesKnitted
O
3

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.
Optometrist answered 11/10, 2012 at 10:48 Comment(2)
I am getting the same error can you please elaborate how you were able to solve it. Thanks!Knitted
There is no RCA and fix for this issueFellows
A
3

In my case, libociicus.so library was missing. It can be found in Oracle Instant Client.

Armour answered 20/8, 2018 at 12:23 Comment(1)
I can no longer see this so file in the instant client.Regain
W
2

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.

Wile answered 18/1, 2013 at 4:21 Comment(0)
Q
1

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.

Quenelle answered 8/5, 2021 at 3:53 Comment(1)
You can also adapt your 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
L
1

The following isn't really a good solution. I'm not sure myself what made the deal. But for me the solution was to:

  • drop all other oracle clients from my PC
  • clear ORACLE_HOME and PATH from paths to dropped clients
  • restart the PC

After that the error was gone

Lytic answered 28/4, 2022 at 12:28 Comment(1)
This was the way for me. No matter what I did, things didn't work. For me I didnt have Oracle installed locally, instead is running on the server. So I not only had to remove the ORACLE_HOME env, had to restart PC for it to take effect (ensure env var is gone after restart).Torbart
J
0

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!

Johppa answered 18/11, 2019 at 15:41 Comment(0)
L
0

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.

Lamartine answered 28/5, 2021 at 2:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.