MKMohanty
MKMohanty

Reputation: 966

Tns protocol adapter error with Oracle and ODAC

I am using Oracle 11g express edition.Getting error when I try to connect with

SQLPLUS / AS SYSDBA

in command window. Error is : TNS protocol adapter error.

tnsping tns_entry_name

Message:Used parameter files: C:\oraclexe\app\oracle\product\11.

TNS-03505: Failed to resolve name

I am using window XP, Oracle Service is running, Firewall is off. I can connect through sqldeveloper but not through sql plus.

Please help guys, if you need any other information kindly reply. Many thanks.

EDIT: tnsnames.ora file

XE =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

ORACLR_CONNECTION_DATA = 
  (DESCRIPTION = 
    (ADDRESS_LIST = 
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) 
    ) 
    (CONNECT_DATA = 
      (SID = CLRExtProc) 
      (PRESENTATION = RO) 
    ) 
  ) 

EDIT2 : Unistalled the Oracle Developer tools with ODAC 11.2 release 5. And everything goes back to normal. I can connect through sqlplus. But I want to connect through .NET, Is ODTwithODAC 11.2r5 not compatible with oracle 11g express. Please help.

EDIT3: As by the comments, In order to use ODT with ODAC 11.2 , do I need to install Oracle Client also or there some another way. Please suggest Many thanks.

Upvotes: 1

Views: 6150

Answers (3)

user6007285
user6007285

Reputation: 1

The best thing someone can do is to go

c:>\regedit ->SOFTWARE->Oracle->

change the Oracle home/base ..This is what I did to resolve my issue.

Upvotes: -1

MKMohanty
MKMohanty

Reputation: 966

I sort out the problem by installing xcopy client,as express version doesnt have home path. So I installed the Oracle Developer tools with xcopy client which I downloaded from : HERE

Its like Oracle 11g ODAC with Xcopy Deployment, which allows you to deploy the Oracle Instant Client and the ODP.Net driver just by copying a few DLLs over and registering them. That doesn't require a full-blown Oracle client installation. Thanks @Jasti to put me into right direction through your valuable comments

Upvotes: 2

Dieter DHoker
Dieter DHoker

Reputation: 421

I suspect by installing Oracle Developer Tools you installed an oracle client next to your oracle database. The windows PATH variable might have the bin directory listed of this client installation first instead of the database bin directory. This way you use that sqlplus instead of the one of your database. If this is the case you have to specify a correct connect identifier when trying to logon. eg.:

sqlplus /@//localhost:1521/XE as sysdba;

or adjust the windows PATH to list the database bin first and restart your command prompt.

Upvotes: 3

Related Questions