connection to db works with ezconnect but fails with tnsnames.ora
Hi,
When I try to connect to remote datbase using 10g ezconnect, it works fine. But when I tried to connect to same database using tnsnames.ora, it fails:
sqlnet.ora on client side:
================
###SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH=(tnsnames, onames, hostname, ezconnect)
tnsnames.ora on client side
=================
MRAP =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = moody)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = MRAP.ALBILAD.COM)
)
)
Listener On DB Server:
===============
$ lsnrctl status
LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production on 04-APR-2010 16:29:16
Copyright (c) 1991, 2007, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=moody)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.4.0 - Production
Start Date 04-APR-2010 16:28:59
Uptime 0 days 0 hr. 0 min. 16 sec
Trace Level off
Security ON: Local OS Authentication
SNMP ON
Listener Parameter File /u01/app/oracle/product/10.2.0/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=moody)(PORT=1521)))
Services Summary...
Service "mrap.albilad.com" has 1 instance(s).
Instance "mrap", status READY, has 1 handler(s) for this service...
Service "mrapXDB.albilad.com" has 1 instance(s).
Instance "mrap", status READY, has 1 handler(s) for this service...
Service "mrap_XPT.albilad.com" has 1 instance(s).
Instance "mrap", status READY, has 1 handler(s) for this service...
The command completed successfully
Now, on client, when I connect with each of methods written above, following is output:
C:\Documents and Settings\c900796>sqlplus ingrian/ingrian@10.6.2.83:1521/mrap.albilad.com
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Apr 4 16:57:18 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> show user;
USER is "INGRIAN"
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64
bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
C:\Documents and Settings\c900796>sqlplus ingrian/ingrian@mrap
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Apr 4 16:57:25 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified
Enter user-name:
ERROR:
ORA-12560: TNS:protocol adapter error
Enter user-name:
ERROR:
ORA-12560: TNS:protocol adapter error
SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
C:\Documents and Settings\c900796>
What do you suspect could be the issue?
Br,
--
Anjum