Re: tnsping working; sqlplus not

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Tue, 14 Mar 2006 18:21:31 +0100
Message-ID: <4416fb9b$0$20879$636a55ce_at_news.free.fr>


<phraje_at_gmail.com> a écrit dans le message de news: 1142356195.618312.53800_at_i39g2000cwa.googlegroups.com...
|I am trying to connect to a client's Oracle DB. I have installed the
| client on my PC, and copied their supplied tnsnames.ora file into
| ($ORACLE_HOME)\network\admin. The sanitized results of my attempts to
| connect are below.
|
| Tnsping is working:
| C:\oracle\product\10.2.0\client_2\BIN>tnsping instance
| TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on
| 14-MAR-2006 10:33:19
|
| Copyright (c) 1997, 2005, Oracle. All rights reserved.
| Used parameter files:
| C:\oracle\product\10.2.0\client_2\network\admin\sqlnet.ora
| Used TNSNAMES adapter to resolve the alias
|
| Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS =
| (PROTOCOL = TCP) (HOST = hostname) (PORT = 1523))) (CONNECT_DATA = (SID
| = instance) (SDU=8192) (TDU=32767)))
| OK (570 msec)
|
| SQLPlus is not working:
| C:\oracle\product\10.2.0\client_2\BIN>sqlplus
| username/password_at_instance
| SQL*Plus: Release 10.2.0.1.0 - Production on Tue Mar 14 10:34:26 2006
| Copyright (c) 1982, 2005, Oracle. All rights reserved.
|
| ERROR:
| ORA-12154: TNS:could not resolve the connect identifier specified
|
| Enter user-name: username
| Enter password:
| ERROR:
| ORA-12560: TNS:protocol adapter error
|
| Same name, same computer, same command prompt, different results. If
| anyone has any suggestions, I'd really appreciate them. The DBA is
| just telling me that "it's your PC, if tnsping works, sqlplus should
| work".
|
| Thanks,
| Bob
|

The main error is:

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

Check your tnsnames.ora file (tnsping doesn't check connect_data).

Regards
Michel Cadot Received on Tue Mar 14 2006 - 18:21:31 CET

Original text of this message