Oracle connection under Linux (Ubuntu)

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
Dionic
Fresh Boarder
Fresh Boarder
Posts: 3
Joined: 15.10.2009, 12:45
Contact:

Oracle connection under Linux (Ubuntu)

Post by Dionic »

Hi guys. Sorry about my english. It is not one of the best, i am russian.

I am with a problem.

I work with remote Oracle databases,
use Linux(Ubuntu) and install instant oracle client.
If i connect to remote DB from sqlplus or use standart lazarus component - OracleConnection, all is GOOD. But when i use ZConnection oracle return the error ORA-12154.

There is someone that can help me ?
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

A quick search on the web leads me to http://ora-12154.ora-code.com/
which says :

Code: Select all

ORA-12154:
TNS:could not resolve the connect identifier specified
Being an oracle developer myself I know this means the oracle NET interface can't figure out which oracle server/listener he should talk to.
Testing zeoslib with Oracle these are the settings I use

Code: Select all

oracle.protocol=oracle
oracle.host=localhost
oracle.port=
oracle.database=orcl
oracle.user=zeoslib
oracle.password=****
where orcl is defined in tnsnames.ora as

Code: Select all

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = FAMDAEMS)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORCL)
    )
  )
As far as I can remember this behaviour should be exactly the same on a Linux machine.

Now I'm not sure on the reason why this fails in your situation. So here are some (educated) guesses:
- are your connection component settings correct? I think only the dabase name, user, password and protocol should be set.
- are you using the TNSNames alias as database name?
- is the ORACLE_HOME variable set in the environment used by your zeoslib based program? Because the OCI will need that to locate your tnsnames file.

Mark
Image
Post Reply