Link to home
Start Free TrialLog in
Avatar of amutallibkhan
amutallibkhanFlag for Saudi Arabia

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.
Avatar of Ora_Techie
Ora_Techie

Do you have more than one oracle homes?
Avatar of amutallibkhan

ASKER

Ya, we have.
ASKER CERTIFIED SOLUTION
Avatar of esmail1349
esmail1349
Flag of Iran, Islamic Republic of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
C:\Documents and Settings\Abdulmutallib>tnsping 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\admin\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)
pepsi host string should be in D:\oracle\ora92\network\admin\tnsnames.ora
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?
Helped in getting resolved.