Oracle connection from .NET

Posted on 2005-04-30
Last Modified: 2008-02-01
OK here's the deal. I am so frustrated right now because I keep having the same error and hope that someone out there smarter than me can come up with the fix. I've installed Oracle 10g on a W2k Server with SP4. I'm accessing it with .NET 2003 on a Windows XP SP2 machine which I have installed the Oracle 10g Data Provider for .NET(ODP.NET) . Everytime I try to connect to the the Oracle machine I get the following error. "TNS: listener does not currently know of service requested in connect descriptor". Everything I find on the mighty google tells me that it has to do with either my listener.ora, or tnsnames.ora file which I'm assuming is on the client not the server however none of them say anything about what it's supposed to look like. Also I can do a TNSPING just fine to the Oracle box.

I have the deepest appriciation and respect for anyone who is able to help me with a solution.
Question by:airwaysfreight
    LVL 16

    Expert Comment

    by:Peter Kwan
    1. Are you connecting to server using .NET program? If yes, can you please post your connection string?
    2. Is there any firewall between the two machines? Please check the firewall settings.
    3. Can you use sql plus in the client machine to connect to server machine?
    LVL 5

    Accepted Solution


    The listener received a request to establish a connection to a database or other service. The connect descriptor received by the listener specified a service name for a service (usually a database service) that either has not yet dynamically registered with the listener or has not been statically configured for the listener. This may be a temporary condition such as after the listener has started, but before the database instance has registered with the listener.

    Action: - Wait a moment and try to connect a second time.- Check which services are currently known by the listener by executing: lsnrctl services <listener name>- Check that the SERVICE_NAME parameter in the connect descriptor of the net service name used specifies a service known by the listener.- If an easy connect naming connect identifier was used, check that the service name specified is a service known by the listener.- Check for an event in the listener.log file.

    Check to see if the service_name given in tnsnames.ora is correct.
    If you have DB_DOMAIN=WORLD is set in init<sid>.ora or spfile, then the service name would be <sid>.WORLD. Check to see the service registration when you run lsnrctl status.

    check for SQLNET.AUTHENTICATION_SERVICES= (NTS) in sqlnet .ora try to make it nione and proceed




    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
    How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now