Solved

DBLink issue, ORA-12154: TNS:could not resolve service name

Posted on 2010-09-07
8
1,307 Views
Last Modified: 2013-11-16
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.
0
Comment
Question by:amutallibkhan
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 13

Expert Comment

by:riazpk
ID: 33616139
Do you have more than one oracle homes?
0
 

Author Comment

by:amutallibkhan
ID: 33616160
Ya, we have.
0
 
LVL 1

Accepted Solution

by:
esmail1349 earned 500 total points
ID: 33616269
test TNSPING PEPSI in windows command prompt on machine that DBlink arised.
it should return OK.
else check pepsi host string for any problem.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:amutallibkhan
ID: 33616342
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)
0
 
LVL 1

Expert Comment

by:esmail1349
ID: 33616616
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"
0
 
LVL 4

Expert Comment

by:boriskalavsky
ID: 33621755
check firewall
0
 
LVL 4

Expert Comment

by:boriskalavsky
ID: 33621827
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?
0
 

Author Closing Comment

by:amutallibkhan
ID: 33624303
Helped in getting resolved.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
case statement in where clause 5 48
exp/imp 25 75
Oracle Forms 10g: How-To Prevent a Commit of 1 Record in Master-Detail block. 3 29
pivot rows to columns 1 18
Hello All, In previous article we used Hortonworks sandbox to work with Hadoop. Now, lets think to create own single node Hadoop on Linux. Here we Install and Configure Apache Hadoop on UI based Oracle Linux. I assume, you have VMware installe…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question