travaller2
travaller2

Reputation: 371

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

Upvotes: 11

Views: 106091

Answers (10)

SergiyKolesnikov
SergiyKolesnikov

Reputation: 7795

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

Upvotes: 3

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

Upvotes: 1

Karagee
Karagee

Reputation: 48

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.

Upvotes: 0

Yan
Yan

Reputation: 884

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.

Upvotes: 1

Konrad
Konrad

Reputation: 377

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!

Upvotes: 0

Gorkem
Gorkem

Reputation: 961

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"

Upvotes: 9

Teddy Zhu
Teddy Zhu

Reputation: 51

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

Upvotes: 5

Alex InTechno
Alex InTechno

Reputation: 1261

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.

Upvotes: 4

LiJunjie
LiJunjie

Reputation: 90

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.

Upvotes: 2

Anshu
Anshu

Reputation: 7853

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.

Upvotes: 3

Related Questions