Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 28th, 2005, 03:08 PM
ChuckieT ChuckieT is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2002
Posts: 18 ChuckieT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 59 sec
Reputation Power: 0
ORA-12154: TNS:could not resolve service name

Hi there,

I'm having issues connecting to an Oracle 9i database using Toad with one of my computers.

Let me provide some details regarding the situation:

- A new instance of a database we are using here has been set up on a new server. As such, I updated the TNSNames.ora file on both of my computers with the appropriate information.

- One of my computers can connect to the database on the new server just fine. (Windows XP)

- The other one gives me an error: ORA-12154: TNS:could not resolve service name. (Windows 97). I attemted to ping the server from both computers and I can do that with no issues. I'm just wondering why I get that error even though the TNSNames.ora file has the same information on both computers.

Any suggestions or advise you can give me would be greatly appreciated. Please let me know if you need any additional information.

Thanks!
ChuckieT

Reply With Quote
  #2  
Old March 1st, 2005, 02:03 AM
galith_haham galith_haham is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 64 galith_haham User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 25 m 17 sec
Reputation Power: 5
Dns

Hi,

could it be that one of them is using the dns and not tns?
check your sqlnet.ora and see if it is using the dns or the tns.

Galit.

Reply With Quote
  #3  
Old March 1st, 2005, 11:08 AM
ChuckieT ChuckieT is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2002
Posts: 18 ChuckieT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 59 sec
Reputation Power: 0
It's strange, but on the computer where it does not work, I can't find an sqlnet.ora file. Could this be causing the problem? If so, how can I resolve it?

Reply With Quote
  #4  
Old March 2nd, 2005, 02:03 AM
galith_haham galith_haham is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 64 galith_haham User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 25 m 17 sec
Reputation Power: 5
Hi,

you have two ways to do that:

1. remove the sqlnet.ora file in the machine where it does not work.
2. correct the sqlnet.ora so it will work with the tnsnames.

the easiest way is 1.

Galit.

Reply With Quote
  #5  
Old March 2nd, 2005, 11:39 AM
ChuckieT ChuckieT is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2002
Posts: 18 ChuckieT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 59 sec
Reputation Power: 0
But I don't have a sqlnet.ora file on the computer that doesn't work.

Reply With Quote
  #6  
Old March 2nd, 2005, 11:49 AM
galith_haham galith_haham is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 64 galith_haham User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 25 m 17 sec
Reputation Power: 5
Copy it from the one which has or create a new one - if the tnsnames includes .world extentions you need the sqlnet to include it as well.
an sqlnet sample:

# SQLNET.ORA Network Configuration File: O:\ORAWIN95\NET80\ADMIN\sqlnet.ora
# Generated by Oracle configuration tools.

NAME.DEFAULT_ZONE = world

NAMES.DEFAULT_DOMAIN = world

sqlnet.authentication_services = (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES,HOSTNAME )


Reply With Quote
  #7  
Old March 9th, 2005, 02:34 PM
ChuckieT ChuckieT is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2002
Posts: 18 ChuckieT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 59 sec
Reputation Power: 0
Sorry for the late response, I was on vacation.

I tried what you suggested and I still get the same error. Any ideas?

Reply With Quote
  #8  
Old March 12th, 2005, 11:30 PM
galith_haham galith_haham is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 64 galith_haham User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 25 m 17 sec
Reputation Power: 5
does the tns names contains any extention (like .world)?
if so try and remove it.
in any case you might want to consider using dns instead of a tns this way you can avoid this differences between variouse machines.

Reply With Quote
  #9  
Old March 15th, 2005, 05:52 PM
ChuckieT ChuckieT is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2002
Posts: 18 ChuckieT User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 33 m 59 sec
Reputation Power: 0
Quote:
Originally Posted by galith_haham
does the tns names contains any extention (like .world)?
if so try and remove it.
in any case you might want to consider using dns instead of a tns this way you can avoid this differences between variouse machines.


I checked my TNSNames file and there are no .world extensions.

How would I go about using DNS instead of TNS with Toad?

Reply With Quote
  #10  
Old March 16th, 2005, 01:01 AM
galith_haham galith_haham is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2004
Posts: 64 galith_haham User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 25 m 17 sec
Reputation Power: 5
1. if you want send me your tnsname+sqlnet and i will take a look at it.
2. to add to the dns u need someone to add the dbname and the hostname/ip to the company dns. after that you need to change the sqlnet from tnsnames to hostname and it will work.

Galit.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > ORA-12154: TNS:could not resolve service name


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway