Solved

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

Posted on 2010-09-07
8
1,293 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
 

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Note: You must have administrative privileges in order to configure lead or case queues. Salesforce.com (http://www.Salesforce.com) is a cloud-based customer relationship management (CRM) system. It is widely used around the world by sales and ma…
Note: You must have administrative privileges in order to create/edit Sharing Rules. Salesforce.com (http://www.salesforce.com) (SFDC) is a cloud-based customer relationship management (CRM) system. It is a database most commonly used by sales an…
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
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now