Results 1 to 7 of 7
  1. #1
    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

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,431
    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.

  3. #3
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,627
    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.
    There are no stupid questions, but there are a LOT of Inquisitive Idiots.

  4. #4
    Join Date
    Nov 2009
    Posts
    5

    Aditional info

    Hi, i'll provide additional infos ASAP. thnx

  5. #5
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,627
    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.
    There are no stupid questions, but there are a LOT of Inquisitive Idiots.

  6. #6
    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

  7. #7
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,627
    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!
    Last edited by anacedent; 12-02-09 at 20:01.
    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.
    There are no stupid questions, but there are a LOT of Inquisitive Idiots.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •