Page 1 of 1

Oracle connection under Linux (Ubuntu)

Posted: 19.11.2010, 13:17
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 ?

Posted: 19.11.2010, 23:25
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