December, 2009


14
Dec 09

Oracle tip for tnsnames.ora

I don’t know if anybody encountered this problem, but we have spent more then one day trying to fix it. We have in our tnsnames.ora more entries like this:

SEARCH =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ******.ro)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ******)
)
)

SEARCH2 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ******)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ******)
)
)

SEARCH3 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = ******)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ******)
)
)

Although it’s all good defined, we couldn’t connect from php to those servers. Finally we figured out that before SEARCH2 and SEARCH3 there was an empty space. After we deleted the empty space it was all cool.

Hope this helps anybody from wasting some precious time.