Hi ,
I am getting a ORA_12154 Listener cannot resolve service name when I try to connect using sql plus.

I have 2 versions of Oracle (8.0.5 and 8.1.7) installed on a windows 2000 machine under different oracle home
The Oracle Home are

Oracle 8.0.5
----------------
Ora805-Home
c:\Ora805 - directory

Oracle 8.1.7
--------------
OracleOra81-Home
c:\Oracle\Ora81 - Directory

Below is the error.Please note that I am able to connect to the Oracle 8.0.5 Database.

SQL> connect scott/tiger@orcl
Connected.

but with oracle 8i database i get the error

SQL> connect scott/tiger@orcl8i
ERROR:
ORA-12154: TNS:could not resolve service name

Below are the tnsnames and listener files for both the databases.

TNSNAMES.ORA for Oracle 8i Database
--------------------------------------------
ORCL8I.HEROLD.COM =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = aminocha)(PORT = 1400))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl8i)
)
)

listener.ora for Oracle 8i Database
----------------------------------------
LISTENER3 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = aminocha)(PORT = 1400))
)
)
)

SID_LIST_LISTENER3 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = Orcl8i)
(ORACLE_HOME = c:\oracle\ora81)
(SID_NAME = ORCL8i)
)
)

TNSNAMES.ORA for Oracle 8 database
------------------------------------------
ORCL.WORLD =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = aminocha)(PORT = 1521))
(CONNECT_DATA = (SID = ORCL))
)

Listener.Ora for Oracle 8.0.5 database
--------------------------------------------
LISTENER =
(ADDRESS = (PROTOCOL = TCP)(HOST = aminocha)(PORT = 1521))


SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = aminocha)
(SID_NAME = ORCL)
)
(SID_DESC =
(SID_NAME = extproc)
(PROGRAM = extproc)
)
)

Also note that i am able to do a tnsping on both the databases as seen below


C:\>tnsping80 orcl

TNS Ping Utility for 32-bit Windows: Version 8.0.5.0.0 - Production on 27-APR-01
18:09:09

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

Attempting to contact (ADDRESS=(PROTOCOL=TCP)(HOST=aminocha)(PORT=1521))
OK (60 msec)

C:\>tnsping orcl8i

TNS Ping Utility for 32-bit Windows: Version 8.1.7.0.0 - Production on 27-APR-20
01 18:09:15

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

Attempting to contact (ADDRESS=(PROTOCOL=TCP)(HOST=aminocha)(PORT=1400))
OK (50 msec)


Please Help.

Thanks
Anurag