If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Oracle > TNS:listener does not currently know of service requested in connect descriptor

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
Join Date: Nov 2009
Posts: 5
TNS:listener does not currently know of service requested in connect descriptor

Hi all,

I get this error
TNS:listener does not currently know of service requested in connect descriptor
when try to connect from C# and Oracle.DataAccess to database.
When using sqlplus from that machine i can log in to database on other machine with same username/password.

I dont know what else to do.

Thanks in advance
Reply With Quote
  #2 (permalink)  
Old
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 5,396
See if setting the TNS_ADMIN environment variable helps. It should point to the directory containing tnsnames.ora
__________________
---
"It does not work" is not a valid problem statement.
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 7,597
You provide us

No Operating System name or version
No Oracle version number (SELECT * from v$version).
No error message (not your interpretation of the actual full and complete message).
No actual SQL or command line to produce your results.
Therefore no assistance for you is possible at this time.
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Don't say, show. Don't promise, prove.
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
Join Date: Nov 2009
Posts: 5
Aditional info

Hi, i'll provide additional infos ASAP. thnx
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 7,597
post copy of tnsnames.ora file being used

generate error again, then post last 20 - 30 lines from listener.log which displays same error code.
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Don't say, show. Don't promise, prove.
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
Join Date: Nov 2009
Posts: 5
HI all,

here is the SELECT * from v$version command output:
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

Os is winxp sp2.

Here is the code which throws such exception, parameters are passed:

string cons = "Data Source = " + ip + ";User Id=" + user + ";Password=" + pass + ";"
conn = new OracleConnection(cons);
conn.open();

The same user/pass works from sqlplus.

Here is contents of tnsnames.ora and listener.log


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

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

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



02-DEC-2009 11:01:16 * service_update * xe * 0
02-DEC-2009 11:01:49 * service_update * xe * 0
02-DEC-2009 11:02:22 * service_update * xe * 0
02-DEC-2009 11:02:55 * service_update * xe * 0
02-DEC-2009 11:05:25 * (CONNECT_DATA=(SERVICE_NAME=ddd.dd.dd.d)(CID=(PROG RAM=h:\windows\microsoft.net\framework\v2.0.50727\ aspnet_wp.exe)(HOST=EF-F1389A67D26C)(USER=ASPNET))) * (ADDRESS=(PROTOCOL=tcp)(HOST=sss.ss.ss.ss)(PORT=15 82)) * establish * ddd.dd.dd.d * 12514
TNS-12514: TNS:listener does not currently know of service requested in connect descriptor
02-DEC-2009 11:05:25 * (CONNECT_DATA=(SERVICE_NAME=ddd.dd.dd.d)(CID=(PROG RAM=h:\windows\microsoft.net\framework\v2.0.50727\ aspnet_wp.exe)(HOST=EF-F1389A67D26C)(USER=ASPNET))) * (ADDRESS=(PROTOCOL=tcp)(HOST=sss.ss.ss.ss)(PORT=15 83)) * establish * ddd.dd.dd.d * 12514
TNS-12514: TNS:listener does not currently know of service requested in connect descriptor

s - source ip
d - destination ip
Reply With Quote
  #7 (permalink)  
Old
Registered User
 
Join Date: Aug 2003
Location: Where the Surf Meets the Turf @Del Mar, CA
Posts: 7,597
Yes, you provided what was requested.
Yes, you have a problem.

>I get this error
>TNS:listener does not currently know of service requested in connect descriptor
>when try to connect from C# and Oracle.DataAccess to database.
>When using sqlplus from that machine i can log in to database on other machine with same username/password.

The fact that the connection succeeds when using sqlplus, means the DB server is properly configured.

Therefore I conclude that the problem only involves connect from C# and Oracle.DataAccess to database.
I don't have incite into how to debug C#.

As a possible long shot in solving this mystery please try the following & post results.

within the connection string change "XE" to "xe".

Good Luck!
__________________
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Don't say, show. Don't promise, prove.

Last edited by anacedent; 12-02-09 at 20:01.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On