Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
358 views
in Technique[技术] by (71.8m points)

database - ERROR 12545 : Connect failed because target host or object doesn't exist while trying to connect sqlplus

I want to install oracle instant client but I have been stuck while I was trying to remote DB. I always got error ORA-12545, but my oracle DB is active and works fine.. i already started listener and config /etc/host on both side.

Here's my tnsnames.ora configuration on Oracle Database server:

ROLFSAN =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ullabritta)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = rolf)
    )
  )

and here's my tnsname.ora configuration on oracle instant :

SVEN = -- i give this name as i wish, there's no sven on oracle database
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = ullabritta)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = rolf)
    )
  )

did i do something wrong? or there's specific configuration on oracle database server??


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Use the IP address, not the hostname. Oracle client uses DNS to resolve the name, and may not use the hosts file.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.8k users

...