Link to home
Create AccountLog in
Avatar of scissorhand
scissorhand

asked on

ORA-12545: Connect failed because target host or object does not exist.

I have a web application written in asp connecting to Oracle database, once in a while system will receive this error msg, ORA-12545: Connect failed because target host or object does not exist.
And I have to ask the server admin to restart the virtual directory. The connection string is roughly like
Provider=MSDAORA;Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=<server>)(PORT=1521))(CONNECT_DATA=(SID=MCC)));User ID=<user>;Password=<password>
Please advise how to solve the problem
Avatar of Sujith
Sujith
Flag of United Kingdom of Great Britain and Northern Ireland image

Are you able to ping the <server>?
Change the <server> with the actual IP address and try.
Avatar of scissorhand
scissorhand

ASKER

If it happens, only the web application is affected, database can still be connected using any tools, when happen, the virtual directory has to be restarted.
ASKER CERTIFIED SOLUTION
Avatar of joebednarz
joebednarz
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Any reason we need to use the IP address instead of DNS? Any impact?
Apart from the suggested answer of substituting the host name with the Ip I have to say that adding the the ip address with the server name to the "hosts file" will help.

What is the "hosts file"? In the DNS server or the connection string?
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account