ORA-12154: TNS:could not resolve service name

    The database you are trying to connect to, is not known by your Oracle client.



    Typically, every Oracle Home installed on your pc wil have a subdirectory called network\admin or net80\admin (Oracle 8.0 client).

    This subdirectory should contain a file sqlnet.ora which contains following line:

    NAMES.DIRECTORY_PATH= (TNSNAMES, HOSTNAME)

    Possible other values are ONAMES, NCIS, OID, ...


    In the case of Oracle Instant client or if someone has changed the default location where sqlnet.ora and tnsnames.ora resides, you will have to look for the alternative path which is identified by the TNS_ADMIN variable.

    This can either be a registry variable (set on HKEY_LOCAL_MACHINE\software\oracle), an environment variable (see your .profile on Unix or choose Properties, Advanced, Environment Variables of My Computer on Windows) or stored in some batch script.


    Default installations will use a TNSNAMES.ora file to resolve database names.

    See if the tnsnames.ora file exists in your sub directory.


    If it doesn't exist and NAMES.DIRECTORY_PATH only contains TNSNAMES (and optionally HOSTNAME), there will be no name resolving.


    You will need to create a tnsnames.ora file which will contain all databases you want to connect to.

    A typical entry looks like this:

    ORA102.WORLD =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SID = databasename)
    )
    )



    You will have to replace hostname and databasename and possible the portnumber to reflect your Oracle databases.


    If you think both sqlnet.ora and tnsnames.ora are correct, you might be using multiple Oracle Homes.

    Typically this is the case if you install Oracle Developer suite after you install a database on your pc.


    With Oracle Locator Express you can easily switch between multiple Oracle Homes.


    If you are using other resolving technologies such as Oracle names or Oracle Internet Directory, you can add the service to either ONAMES or OID.



Adverteren bij Daisycon
Forum Messages
30-JAN-2008 22:39:43Driver's SQLSetConnectAttr failedzek Reply
i have a program connecting to oracle server using VC++. i got this 2 error

Driver's SQLSetConnectAttr failed State:IM006,Native:0,Origin:[Microsoft][ODBC Driver Manager]
ORA-12154: TNS:could not resolve service name State:08004,Native:12154,Origin:[Oracle][ODBC][Ora]

But using a simple program that i created using VC++ also, i can connect to the oracle.. i also tnsping.. so whats the problem?.. Can anyone help me to solve this problem?

Thanx!
31-JAN-2008 07:51:00TruncatedDbMotive Reply
Can it be that the variable holding the connect identified is too small and that the value is truncated?

13-FEB-2008 01:55:36still failed..zek Reply
what do u mean by variable holding the connect identified is too small?
and why the value is truncated?

can't u explain more about this..
this problem still occurred... i don't know what to do to solve this problem...
20-FEB-2008 04:09:02ORA-12154: TNS:could not resolve service nameKunal Sanyashiv Reply
We are using ORACLE 9i database for primavera software. it is a project management software.
to upgrade this software from primavera 5 to primavera 5 service pack 3 we also require to
change the database schema or upgrade the database. while upgrading database i got the error
mentioned in the title. I checked out tnsname.ora file but it didnot work.
plz give me any solution to solve this problem.
20-FEB-2008 07:18:49TNS:could not resolve service namevenkat Reply
I installed a oracle client in my system. after installation when i tried to login it is throwing error as 'TNS:could not resolve service name'. I have checked the tnsname.ora there is no clue. how to proceed very urgent. Whether any installation path or anything to be changed.
02-MAR-2008 05:49:10problemfakhrey Reply
dir sear
ihave problem
1setuped orcale10g and devolper6i in my device
but the database not connection my form please ihope to your slove my problem
my form gived (( can not reslove server tns))
thank
05-MAR-2008 00:37:50ORA-12154santhosh Reply
We are using ORACLE 9i database, I already used oracle forms and reports, but now the database is not connecting. It shows the same error that"ORA-12154:TNS could not resolve the service name". I have tried various methods mentioned in verious sites, but no use.
05-MAR-2008 02:57:37FORMSDbMotive Reply
Forms, especially < iDeveloper Suite 9 has a different Oracle home.

You have to make sure the tnsnames entry is know to this Oracle home.

Search for all the tnsnames.ora in your Operating system and check if the service name is available to all the tnsnames.ora

02-APR-2008 14:42:07oracle client 9 and vista 64 bitpzac Reply
err
ORA-12154: TNS:could not resolve service name
and
ORA-06413 with manager console
but sqlplus is ok on the connection with my db
: ->  02-APR-2008 15:22:17Not certifiedDbMotive Reply
Oracle 9 is not certified to run on Windows Vista 64bit.

There are a number of problems reported, like a different path for the "Programs Files" subdirectory.

What you can do is to enable client side sqlnet tracing in order to determine the error code returned by the SQLNET network stack.

Have a look at your sqlnet.ora to enable sqlnet client tracing

30-APR-2008 08:31:56ORA-12154: TNS:could not resolve service nameanirban ghosh Reply
I get this msg when ever i try to login from command promt using sqlplus also tried
sqlplus scott/tiger@orcl (my service name).However it is connecting fine from sqldevelper using both basic & tnsname login.It is successfully connecting from oracle 9i net configuration assistant
and net manager.
This is my tnsnames.ora entry:
DB.SKYTECHSOLUTIONS.INTRA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.20.1.100)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
: ->  30-APR-2008 08:53:44How do you connectDbMotive Reply
Do you connect using DB.SKYTECHSOLUTIONS.INTRA, or just using DB?

If the latter, what is the value of SQLNET.DEFAULT_DOMAIN in your sqlnet.ora file?

22-MAY-2008 05:03:37ProblemDeepak Raj Awasthi Reply
Dear Sir,
I have installed the Oracle 9i Enterprise Edition in windows 2003 server PC(192.168.0.1)and its working. Then I have installed Developer 2000 in another client machine(192.168.0.3). NOw I want to connect databse from the client. For this I have changed the tnsnames.ora file in client as follows.

file.world =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(Host = 192.168.0.1)
(Port = 1521)
)
)
(CONNECT_DATA = (SID = ORCL)
)
and saved . However I am unable to connect with database. I need help to solve this problem Desperately waiting for solution.
: ->  22-MAY-2008 08:25:23Different Oracle HomeDbMotive Reply
Since you installed developer, your default home will be the home developer is installed in.
You are probably changing the tnsnames.ora in the Oracle home of your database software.

Either change the tnsnames.ora in your developer home, or change the default home using our free tool "Oracle Locator Express"

10-JUN-2008 00:51:08i get ora-12154 errod code in SQL Server 2005 running on windows server 2003 x64luis salgado Reply
hi, i get this error when i tried to do a connection in SSIS package, i need connect to a oracle database that is located in another server, i install the oracle client 10g and the configure that and i dont have problem to add the service name, but, when i want to create a connection in SSIS i get this error, i have installed the version of 32 and 64 bits of the oracle client by recomendations of few of people, but , i dont have positive results. basically, i need to get data from oracle database(server 1) and put into a sql server database(server 2).

thx and regards.
luis salgado
mexico
10-JUN-2008 02:17:12i get ora-12154 errod code in SQL Server 2005 running on windows server 2003 x64luis salgado Reply
hi, i get this error when i tried to do a connection in SSIS package, i need connect to a oracle database that is located in another server, i install the oracle client 10g and the configure that and i dont have problem to add the service name, but, when i want to create a connection in SSIS i get this error, i have installed the version of 32 and 64 bits of the oracle client by recomendations of few of people, but , i dont have positive results. basically, i need to get data from oracle database(server 1) and put into a sql server database(server 2).

thx and regards.
luis salgado
mexico
19-JUN-2008 06:17:53Bijith AP Reply
I have to connect to the database SPPRVP2.eadv.na.jnj.com using TOAD.But while connecting I am receiving the error saying TNS could not resolve the service.I don't have the TNS file for the databse mentioned here.Can you provide the database for the same.
Please help me for resolving this issue....
: ->  19-JUN-2008 08:33:29Cannot provideDbMotive Reply
We cannot provide tnsnames info for companies.

You have to contact your local helpdesk or Oracle team in order to obtain this information
01-JUL-2008 08:58:08ORA-12154: TNS:could not resolve service nameshyam Reply
i am trying to login in isqlplus but when ever i tried to log in iam getting a error msg stating TNS:COULD NOT RESOLVER SERVICE NAME.i tried using scott,tiger,orcl. plz help me to solve this problem
Add your message for ORA-12154
Name:email:
Validation Code:n5dcqy8yehrr3irqa
Enter Code above:
Title:
State your problem: