amutallibkhan
asked on
DBLink issue, ORA-12154: TNS:could not resolve service name
Hi Experts,
I'm able to connect through SQLPLUS, using tkeep/tiger@pepsi
Now created DB Link, in other DB, with the below command:
CREATE DATABASE LINK TKEEPDBLINK
CONNECT TO TKEEP IDENTIFIED BY TIGER
USING 'PEPSI';
When trying to do a
SELECT * from aug@TKEEPDBLINK
gives the below error
ORA-12154: TNS:could not resolve service name
Please do the needful.
Thanks.
I'm able to connect through SQLPLUS, using tkeep/tiger@pepsi
Now created DB Link, in other DB, with the below command:
CREATE DATABASE LINK TKEEPDBLINK
CONNECT TO TKEEP IDENTIFIED BY TIGER
USING 'PEPSI';
When trying to do a
SELECT * from aug@TKEEPDBLINK
gives the below error
ORA-12154: TNS:could not resolve service name
Please do the needful.
Thanks.
Do you have more than one oracle homes?
ASKER
Ya, we have.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
C:\Documents and Settings\Abdulmutallib>tns ping pepsi
TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 07-SEP-20
10 13:18:15
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
D:\oracle\ora92\network\ad min\sqlnet .ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (COMMUNITY = tcp
.world) (PROTOCOL = TCP) (Host = 10.10.40.5) (Port = 1521)) (ADDRESS = (COMMUNIT
Y = tcp.world) (PROTOCOL = TCP) (Host = 10.10.40.5) (Port = 1526))) (CONNECT_DAT
A = (SID = ORCL)))
OK (0 msec)
TNS Ping Utility for 32-bit Windows: Version 9.2.0.1.0 - Production on 07-SEP-20
10 13:18:15
Copyright (c) 1997 Oracle Corporation. All rights reserved.
Used parameter files:
D:\oracle\ora92\network\ad
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (COMMUNITY = tcp
.world) (PROTOCOL = TCP) (Host = 10.10.40.5) (Port = 1521)) (ADDRESS = (COMMUNIT
Y = tcp.world) (PROTOCOL = TCP) (Host = 10.10.40.5) (Port = 1526))) (CONNECT_DAT
A = (SID = ORCL)))
OK (0 msec)
pepsi host string should be in D:\oracle\ora92\network\ad min\tnsnam es.ora
and then
check/add ORACLE_HOME environment variable to value "D:\oracle\ora92"
and then
check/add ORACLE_HOME environment variable to value "D:\oracle\ora92"
check firewall
are you listening on both ports on 10.10.40.5 (1521 and 1526)? Can you ost a listener.ora file from 10.10.40.5?
ASKER
Helped in getting resolved.