Database Networking (MOSC)

MOSC Banner

ORA-12154 using hostname, but IP workd

edited Mar 12, 2014 12:00PM in Database Networking (MOSC) 15 commentsAnswered

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,




Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center