ORA-12154: TNS:could not resolve the connect identifier specified

1751
Views
1
Answers

Hi, I have a.net application which connects to oracle database. I am getting this error when I try to connect to the database.

System.Data.OracleClient.OracleException: ORA-12154: TNS:could not resolve the connect identifier specified 
edit | flag
William Patrick
Asked on: Oct 11, 2011 at 11:46PM

1 Answers

69
9
69

Try these steps.
1. Install oracle client
2. Add the hostname in tnsnames.ora under NETWORK/ADMIN folder in oracle folder
3. Make a TNS ping C:\>tnsping MYDBNAME
4. If TNS ping is resolved your tnsnames.ora is valid.
5. Try connecting to database using any oracle client like SQL developer.
6. Now try connecting through the application if it says the same error then..
7. modify the connection string with the hostname specified in itself like Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;

The final step will resolve the problem is step 1 to 6 dosent work.

Good Luck!!

edit | flag
Gokul A
Answered on: Oct 11, 2011 at 11:55PM

Post your Answer

Search

Welcome to Ask Amoeba!
This is 100% free and interactive site for sharing professional Questions and Answers, Opensource projects, Interview questions.
Learners, beginners, Experts stop and share your knowledge and ideas!

Browse Categories

Browse Tags