Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

connect to oracle server

Status
Not open for further replies.

codo

IS-IT--Management
Oct 31, 2001
187
ID
Im using Oracle 8 Enterprise Edition. My workstation suddenly can't connect to Oracle server. When I'm using Net8 Easy COnfig to test the service i got this messahe
"The test did not succeed.
ORA-12545: Connect failed because target host or object does not exist

There may be an error in the fields entered
or the server may not be ready for a connection.
You can check the server and retry, or continue"

I don't know how it happened, befor that everything is doing fine.
 
Hi,
Are you using using hostname or ip address in your 'tnsnames.ora' file?

You can fix the problem by adding the server's hostname and IP to the C:WINNT\system32\drivers\etc\hosts file on the Microsoft client machine.

Edit the file to include the IP address and the host name of the Oracle server to which you wish to connect, thus: 126.34.10.244 hostname.domainname.com hostname othernames

Be careful not to save the file with an extension.
For example, if using notepad, save the file as "hosts" so that the default extension of .txt does not get appended. This is a workaround in the absence of a domain names server (DNS).
The optimum solution would be to have DNS running and the client configured to use it.

HTH
Regards
Himanshu
 
I already edit the Host files and there's nothing change. I also give comment to all the sqlnet.ora files. What should i do with the tnsnames.ora file? SOrry I'm very new on this Oracle stuff
 
Hi,
The ORA-12545 error is a failure to resolve a hostname to an IP address, which usually means that the hostname in the (host= <hostname>) value in the TNSNAMES.ORA is not resolving.

Occasionally clients will get this error even though they already have the IP address in the TNSNAMES.ORA. The reason for this is that when a client makes a connection to a listener on Windows NT or a shared connection to a listener on Unix, the connection gets redirected. What this means is that a redirect packet is sent back from the listener to the client and the client then makes a new connection. When the listener redirects the connection it sends the addressing information from the LISTENER.ORA, or in the case of MTS the INITsid.ORA, back to the client in a redirect packet. The client must then resolve that addressing information. If the LISTENER.ORA or INITsid.ORA contains a hostname that the client can't resolve, the connection attempt will
fail with an ORA-12545 error even though the information in the TNSNAMES.ORA is correct.

This error can often be resolved by using the server's ip address instead of hostname in the LISTENER.ORA (INITsid.ORA if using MTS) which should force the listener to use the ip address in the redirect packet. A better solution to this error is to enable the client to resolve the hostname that is being returned in the redirect packet.

When the client machine is capable of resolving the fully qualified domain name to an IP address this error will not occur. This is done by adding the server's IP address, hostname, and fully qualified domain name to the name resolution method the that network is using (usually DNS). If this is not possible, the information can be added to the client machine's hosts file.

On NT this file is located at c:\winnt\system32\drivers\etc\hosts

Because redirects in 8i contain the fully qualified domain name, hostname to IP address resolution is critical for a successful connection.

Regards
Himanshu

 
hi,

edit your tnsnames.ora by changing the host=ip address of the database, i think that would solve your problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top