I have opened a new thread for this question.
I am having this trouble and I am connecting to oracle database by "DIRECT" giving host address, port and sid, instead of the usual tnsand alias..
Please help me fix this...
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

slightwv (䄆 Netminder)Connect With a Mentor Commented:
I just noticed from your other post "C:\oracle\product\10.2.0\client_3"

This implies you have two other Oracle client installs.  Verify you are running the sqlplus from the proper ORACLE_HOME.

slightwv (䄆 Netminder) Commented:
Either configure the tnsnames.ora file with the proper information or try the ezconnect method.

I've never tried this with exp but it appears to work for sqlplus:


try (replace the information with your user/password and dbserver info:

exp 'scott/tiger@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=152
D-pkAuthor Commented:
Sorry for the delayed response...
I have just the oracle client installed on my local PC (When I installed it, I didnt even have the tnsnames.ora file I copied that in to the ADMIN folder). I got the tnsnames.ora file from my teammate. He is able to login with the alias with TNS option. But I am not able to, I have to use the "DIRECT" option, IP address of the database and its SID and port to login. If I use the TNS option its throwing the error:

ORA-12154 -- TNS: could not resolve the connect identifier specified.
I am using TOAD tool

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

slightwv (䄆 Netminder) Commented:
I've never used Toad so I'm not sure if it has it's own Oracle piece or uses an installed Oracle client.

Anyway the ora-12154 means there is either a configuration issue with your tnsnames.ora file or you aren't using a valid entry in that file.

since you copied it from a co-worker, are they on the same network you are on and are they connecting to the same databases you are on?

If you have sqlplus installed, I would prefer to troubleshoot this error using sqlplus and not Toad.
D-pkAuthor Commented:
I know posted on the wrong thread and got confused, I dont know how to delete it from the other one...

I am not talking about the exp utility. I want to clarify about just this error.
Whenever I try to login I get this error. I want to fix this first.

Yes my co-worker is on the same network and connecting to the same database.

I tried using SQL*PLUS, I still get the same error.
slightwv (䄆 Netminder) Commented:
>> dont know how to delete it from the other one...

I've taken care of deleting the posts in that thread.

>>I tried using SQL*PLUS, I still get the same error.

Do you have more than one Oracle client/product installed on the machine?

Are you running sqlplus from UNIX or Windows?
D-pkAuthor Commented:
Oracle Client installed on my local PC windows, the sever is in UNIX box.
I am running sqlplus in my local windows machine.
In unix it works fine..

slightwv (䄆 Netminder) Commented:
If the tnsnames.ora file from the Windows machine doesn't contain any sensitive server names or database names, can you post it?

If the names are sensitive, can you dummy them up and post the dummied file?
D-pkAuthor Commented:
    (ADDRESS =
      (PROTOCOL = TCP)
      (HOST =
      (PORT = 1521)
      (SID = fprdd1)

slightwv (䄆 Netminder) Commented:
From a cmd prompt post the results of:

tnsping pprod
D-pkAuthor Commented:
the ping is fine..
But tnsping gave me the following error:

Used parameter files:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = (PORT = 1521)) (CONNECT_DATA = (SID = fprdd1)))
OK (20 msec)

My SQLNET.ORA file contains:


slightwv (䄆 Netminder) Commented:
>>But tnsping gave me the following error:

What error? It ran fine.  See "OK (20 msec)"

now from a command prompt:
sqlplus username/password@PPROD
D-pkAuthor Commented:
I gave this: sqlplus username/password@PPROD (Of Course I agve my username and password)
and got:

SQL*Plus: Release - Production on Mon Feb 28 12:03:18 2011

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

ORA-12154: TNS:could not resolve the connect identifier specified

Enter user-name:
slightwv (䄆 Netminder) Commented:
log into the server: and from a command prompt post the results of: lsnrctl status
slightwv (䄆 Netminder) Commented:
from a command prompt:
set TNS_ADMIN=C:\oracle\product\10.2.0\client_3\network\admin

then try: sqlplus username/password@PPROD
C:\oracle\product\10.2.0\client_3\bin\sqlplus username/password@PPROD
D-pkAuthor Commented:
Perfect! I just uninstalled the other versions and it worked fine..
Thanks a lot slightwv!
All Courses

From novice to tech pro — start learning today.