ORA-12154: TNS:could not resolve service name
From: Sheela <spathiyal_at_yahoo.ca>
Date: 16 Aug 2004 10:05:13 -0700
Message-ID: <678ae5f9.0408160905.7e0aac46_at_posting.google.com>
I am trying to access the tables of a remote database(db2) from db1 database. I am getting the following error: ORA-12154: TNS:could not resolve service name
I tried tnsping the db2 service_name and it is working.
(SID = db2)
(SERVER = DEDICATED)
(SERVICE_NAME = db2servicename)
Date: 16 Aug 2004 10:05:13 -0700
Message-ID: <678ae5f9.0408160905.7e0aac46_at_posting.google.com>
I am trying to access the tables of a remote database(db2) from db1 database. I am getting the following error: ORA-12154: TNS:could not resolve service name
I tried tnsping the db2 service_name and it is working.
I created a dblink like this at db1.
CREATE DATABASE LINK db2.oracle.com
CONNECT TO scott IDENTIFIED BY tiger
USING 'db2servicename';
When I will tried to access the db2 database tables from db1, I am getting the above error.
sql> select sysdate from dual_at_db2.oracle.com ( from db1) ORA-12154: TNS:could not resolve service name
The TNSNAMEs.ora file looks like this.
db2.oracle.com =
(DESCRIPTION =
(ADDRESS_LIST =(CONNECT_DATA =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 85))
)
(SID = db2)
(SERVER = DEDICATED)
(SERVICE_NAME = db2servicename)
Do I need to add anything else in the tnsnames.ora file? Received on Mon Aug 16 2004 - 19:05:13 CEST