Page 1 of 1

Impossible conect to Ora 10G xe

Posted: 25.03.2013, 19:20
by xutanou
Hy everybody, I'm trying to connect from Lazarus 1.0.8 fpc 2.6.2 wit zeos 7.0.3 and always I get the same message error: "OCI ERROR 12154 tns could not resolve the connect identifier specified".

I'm in a client and I want to connect to the server.

the params I use are:

Database: XE
Host name: server's IP
port:1521
password: pasword
username:username (also tried username/pasword@XE)

I perfectly can connect with sql developer and with other applications I made with delphi 7 and odac (not zeos installed). I tried a lot of things, changing Host name, etc...., also googled for that problem, but it seems I don't find any thing, so any help will be great !!!

Posted: 26.03.2013, 13:55
by xutanou
II have been teiting The same Zeoslib in delphi 7 with the same result: "OCI ERROR 12154 tns could not resolve the connect identifier specified"

Posted: 27.03.2013, 18:40
by cfc
hello,

You should create an entry in the tnsnames.ora file.

Examples:

DBNAME =
   (DESCRIPTION =
     (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.10.54) (PORT = 1521))
     (CONNECT_DATA =
       (SERVER = DEDICATED)
       (SERVICE_NAME = service name)
     )
   )

PAAAAI =
   (DESCRIPTION =
     (ADDRESS_LIST =
       (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.1) (PORT = 1521))
     )
     (CONNECT_DATA =
       (SID = sid name)
     )
   )

zconection then configured as:

database = DBNAME or PAAAAI, depending on which database you want to connect
protocol = oracle-9i
user = ****
password = ****

So I connect myself and working properly.

Posted: 28.03.2013, 12:01
by xutanou
Thanks for your reply, in the tnsnames.ora file I have

XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.25.72.230)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)

Very similar to what you told, but it doesen't work, I tried exactly your examples without fortune also. In "Host" I tried an IP and the servername, and also in both cases doese't work :-(. I tried in Lazarus, Delphi 7 and Xe2, so it must be something about config but exactly I can find what... You have been more luky than I with your connection