ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect descriptor

Posted on 2006-05-03
Last Modified: 2013-12-11
I wiped my hard drive and reinstalled Oracle 9i and Toad on my windows xp laptop. I tried to connect to 2 of several remote databases and received the following error in Toad:

ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect descriptor

When I expanded the details section It had the following information:

*** First assume we have a valid install and registry  
Oracle home is set to C:\oracle\ora92  
Bin path is set to C:\oracle\ora92\bin\  
oci.dll found  
Using: C:\ORACLE\ORA92\BIN\oci.dll  
2) Oracle Home Key is SOFTWARE\ORACLE\HOME0  
Looking for TNS_ADMIN environmental variable  
TNS_ADMIN environmental variable doesnt exist,  
looking for TNS_ADMIN reg key using home key: >SOFTWARE\ORACLE\HOME0<  

I have no clue how to fix this. I didn't have this problem before I wiped my hard drive and the settings for the remote connections are the same in the tnsnames.ora file as they were before I wiped my hard drive (I saved a backup of the tnsnames.ora file). Could someone please tell me what is wrong and how I can fix this?
Question by:sikyala
    LVL 142

    Assisted Solution

    by:Guy Hengel [angelIII / a3]
    check please the contents of the following folder (on your client):

    check please the contents of the following folder (on your server):

    on the server, what is the output of
    C:\ORACLE\ORA92\BIN\lsnrctl status

    on the client, what is the output of
    C:\ORACLE\ORA92\BIN\tnsping <service_id>


    Author Comment

    Also When I tnsping the remote database I get the following:

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:\Documents and Settings\506246\Desktop>tnsping Gabriele

    TNS Ping Utility for 32-bit Windows: Version - Production on 03-MAY-20
    06 15:49:07

    Copyright (c) 1997 Oracle Corporation.  All rights reserved.

    Used parameter files:

    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
    ICE_NAME = Gabriele)))
    OK (10 msec)

    C:\Documents and Settings\506246\Desktop>

    I deleted the host information for privacy and security.

    Author Comment

    lsnrctl status

     Instance "Gabriele", status READY, has 2 handler(s) for this service...
    The command completed successfully


    Gabriele =
        (ADDRESS_LIST =
          (ADDRESS = (PROTOCOL = TCP)(HOST = = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = Gabriele)

    I changed the host information for security purposes.

    There is no entry in the listener.ora for the remote database in question. It only has information about the database on my laptop. There was never an entry for the databases I connected to remotely on my backup listener.ora file either.
    LVL 142

    Expert Comment

    by:Guy Hengel [angelIII / a3]
    Then, toad is using another oracle_home possibly (I had that already several times)
    Do you have several oracle_homes on your laptop?

    Author Comment

    I only have one Oracle home. I fixed the problem.

    This setting which is exactly what I had before suddenly doesn't work anymore.

    SERVICE_NAME = Gabriele

    When I changed it to


    it worked.
    LVL 3

    Accepted Solution

    you can use
    sid instead of service_name in tnsnames.ora file
    LVL 3

    Expert Comment

    For further details of such errors and resolutions you can also visit a link

    also from  you can complete documentation

    Haider Ali Syed
    Sr IT Exective PTML

    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.

    I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
    Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
    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 videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

    761 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

    8 Experts available now in Live!

    Get 1:1 Help Now