ORA-12154 using hostname, but IP workd
Hi,
I just finished installing Oracle11g on Linux RedHat5, and I am having a problem connecting to Oracle using the hostname.
sqlplus user/pwd@hostname:1521/sid does NOT work, but user/pwd@ip:1521/sid works fine.
also sqlplus user/pwd@netservicename works as well, when in tnsnames.ora hostname is used.
/etc/hosts:
10.20.30.456 hostname
sqlpnet.ora:
NAMES.DIRECTORY_PATH= (EZCONNECT, TNSNAMES)
tnsnames.ora:
netname01 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = servicename)
)
)
Any help would be appreciated..
Thanks,