Solved

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

Posted on 2007-04-11
12
7,019 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 48

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 48

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 48

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

How our DevOps Teams Maximize Uptime

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

Question has a verified solution.

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

Suggested Solutions

Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Via a live example, show how to take different types of Oracle backups using RMAN.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

831 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