Hello,
I installed InstantClient, but I'm getting the following error while connecting using SQLPlus:
Connect failed because target host or object does not exist.
Can anybody help me with this problem?
Thanks.
Printable View
Hello,
I installed InstantClient, but I'm getting the following error while connecting using SQLPlus:
Connect failed because target host or object does not exist.
Can anybody help me with this problem?
Thanks.
What comes back when you TNSPING the instance you are trying to connect to? I would think that from the limited info you have provided that there isn't an entry for your database instance in your TNSNAMES.ORA file.
There is an entry for database instance in tnsnames.ora, because I copied this file from original location to the new one.
Here is what I did:
1.downloaded zip files and unzipped them
2.removed all entries for PATH variable related to oracle and added new one pointed to the new directory with unzipped files
3.created new subdir c:\instantclient\network\admin
4.copied tnsnames and sqlnet to this folder(admin)from original location(c:\oracle\network\admin)
Have a read of James' article ... http://www.dbasupport.com/oracle/ora...client01.shtml
thanks, but I used this article while installing - didn't help
This might be because the target machine can't be found. In tnsnames.ora you will probably have a line like:Quote:
Originally posted by Alina
Connect failed because target host or object does not exist.
(ADDRESS = (PROTOCOL = TCP)(HOST = MyServer)(PORT = 1521))
Check that you can "ping MyServer" at the OS prompt. If that fails try replacing the host name with its IP address:
(ADDRESS = (PROTOCOL = TCP)(HOST = 123.456.789.123)(PORT = 1521))
(assuming that you can "ping 123.456.789.123" :))
It works both ways...
did you set TNS_ADMIN?
Have you set up TNS_ADMIN?Quote:
Originally posted by slimdave
Have a read of James' article ... http://www.dbasupport.com/oracle/ora...client01.shtml
Have you tried this?:
Quote:
If you would rather not use the tnsnames.ora naming, you can bypass this by using a more descriptive connect string.
Method: sqlplus {user}/{password}@//{machine}:{port}/{service_name}
example: sqlplus scott/tiger@//bier.pinehorse.com:1521/daten
Yes, I set TNS_ADMIN and tested this connect string - same problem