Solved

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

Posted on 2007-04-11
12
7,017 Views
Last Modified: 2013-11-26
When I try to connect to a database from my .NET application, I am getting a
"ORA-12154: TNS:could not resolve the connect identifier specified "   error.

I am able to sqlplus login to the database. No errors there. Ping and Tnsping to the server are working fine too..The tnsnames.ora entry is correct also.

How can I fix this problem?

0
Comment
Question by:LubomirMasar
12 Comments
 
LVL 7

Expert Comment

by:gattu007
ID: 18893499
Are you able to connect from sqlplus from the clinet?


The below mentalink note will give all the details regarding this error


Subject:       TROUBLESHOOTING GUIDE: TNS-12154 TNS:could not resolve service name        Doc ID:       Note:114085.1       
0
 

Author Comment

by:LubomirMasar
ID: 18893645
yes I am able to connect thru sqlplus! But not thru the web app.
0
 

Author Comment

by:LubomirMasar
ID: 18893653
I couldnt access your link..please post again
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 47

Expert Comment

by:schwertner
ID: 18896744
If this is Oracle 10g seems you have to change LISTENER.ORA file:

For STATIC registration of the Oracle service to the Listener:

Go to the remote 10g installation.
In ...\network\admin open listener.ora

see

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = D:\Ora10g)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (SID_NAME = test)
      (ORACLE_HOME = D:\Ora10g)
    )
  )

Add the entry
    (SID_DESC =
      (SID_NAME = test)
      (ORACLE_HOME = D:\Ora10g)
    )
with regard to the particular Oracle Home and SID Name.

Restart the listener:
c:>lsnrctl stop
c:>lsnctl start
0
 

Author Comment

by:LubomirMasar
ID: 18901936
No schwertner taht did not work..I did make all the changes u suggetsed and restated listener.

In fact listener is working correctly. SqlPlus is able to connect to sid. Tnsping works too. Just the web app is failing.
0
 
LVL 47

Expert Comment

by:schwertner
ID: 18903800
Then seems you have more then one tnsnames.ora files on your computer
and your web application uses another one
or
your web application do not use tnsnames at all
and has another mechanism to connect the DB.
0
 

Author Comment

by:LubomirMasar
ID: 18933394
Solved my problem.

Reinstalled Oracle client. Gave Full access permission to ASPNET user to the Oracle Home directory. Restarted the server. It worked.

Please revoke my points. Question withdrawn.
0
 
LVL 47

Expert Comment

by:schwertner
ID: 18937967
Ask the Helpdesk for this
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 19229752
PAQed with points refunded (500)

Computer101
EE Admin
0
 

Expert Comment

by:mservidio
ID: 24269413
Hi All - I am having this same exact problem, and have tried all of the above troubleshooting tips with no luck. Does anyone have a definitive list of configurations and such that need to be checked?
0
 
LVL 20

Expert Comment

by:Venabili
ID: 24269691
mservidio , please ask a new question for your issue. Using someone else's question is kinda against the rules... not to mention that the experts won't see it at all
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Lync server 2013 or Skype for business Backup Service Error ID 4049 – After File Share Migration
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question