oracle tnsname file

hey I need to add my tnsnames.ora file on my local laptop so that I can access my company databases. I open my local tnsnames.ora file and paste the contents of my company tnsnames.ora at the end. But its saying it couldn't resolve name. What mistake might be I am doing please let me know
hussainkhan22Asked:
Who is Participating?
 
systanConnect With a Mentor Commented:
These is the help link;
http://www.dba-oracle.com/t_ora_12154_tns_resolve_service_name.htm

But this is my help steps;
Goto your Services Window, find ORA_yourORAname service,  find ORA_yourORAname that doesn't start,  if you find it,  then right click to view ORA properties, then goto [Log On] then select Local system account,   [check]  the  "Allow service to interact with desktop"

Apply, Ok.
Start ORA_yourORAname service,   there will be an interaction with the desktop console, so Read whats the message, the mesage is an IP_address,  look for it.

If you now know the IP_address...

This can be a shortcut;
Goto your C:\oracle folders....\..\..\.., find a filename with "127.0.0.1", or with a filename "Localhost" then copy the contents of that filename to a new name file <the IP_address> youve seen in the desktop console,  in other words copy filename   then paste it with the new name <the IP_address> youve seen in the desktop console  when you start the ORA_yourORAname service.


Directly this can be a shortbut too;
Goto your C:\oracle folders....\..\..\.., find a filename with "127.0.0.1", or with a filename "Localhost"
copy that filename,  paste it with the new nameS;
your_computer_name.x.x.x.x???
your_ipaddress.x.x.x.x???
0
 
carsRSTCommented:
make sure you have the correct file.  
Search through your machine to make sure you have the correct file.

http://www.dba-oracle.com/t_windows_tnsnames.ora_file_location.htm

Also might check firewall settings on machine and or see if you can ping the database from where you're testing.
0
 
sridharv9Commented:
1. check if you can ping your company db servers.
if good.
2. check your SQLNET.ORA contents (try to make it similar to your company SQLNET.ORA)
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
hussainkhan22Author Commented:
What is the command to check the tnsnames file is correct or not. What is the command for ping
0
 
sridharv9Commented:
c:> ping <dbservername>
c:\%ORACLE_HOME%\bin>tnsping <database_name>

You can find tnsnames.ora file under ORACLE_HOME\network\admin.

eg:ORACLE_HOME=C:\oracle\product\10.2.0\db

If you cannot figure it out paste the tnsnames.ora and sqlnet.ora under ORACLE_HOME\network\admin.
0
 
sumit2906Commented:
try tnsping
c:\tnsping <tns alias>
0
 
Chakravarthi AyyalaDatabase AdministratorCommented:
Could you please copy/paste your tns entry here?
Wondering whether you are referring to the host by its FQDN(fully qualified domain name) and it is not able to resolve it.
If that is the case, i would recommend adding the hostname with ip address to the file "\\WINDOWS\system32\drivers\etc\hosts" and try.
0
 
riazpkCommented:
If you are getting "ORA-12154 TNS:could not resolve service name" then make sure you also copy the sqlnet.ora file contents. Are the oracle client versions on both machines are same?
0
 
hussainkhan22Author Commented:
# tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\db_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

ORACLE10 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 6BB5F1)(PORT = 1523))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = oracle10)
    )
  )

EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

ORACLE9 =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 6BB5F1)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = oracle9)
    )
  )

I am sorry for replying late
0
 
systanCommented:
>>hey I need to add my tnsnames.ora file on my local laptop so that I can access my company databases
you mean!? you copied your company's databases to your laptop?  does your company allow you to copy data's?

OK;
Know your ip address,
know your computer name,

type in your web browser;
http://YOUR_IP_ADDRESS:1523
http://YOUR_COMPUTER_NAME:1523
http://LOCALHOST:1523
http://127.0.0.1:1523

try also :1521 or remove version 9 in your tns since you have 10

Let's see if you can log on the web,
But check first in your Services Window, Check if ORA is started, if not start it.
0
 
hussainkhan22Author Commented:
Thanks alot its working fine now local OEM for my local database.

Generally I see this error
ORA-12154 TNS:could not resolve service name.
What is the solution for this sort of errors.

0
 
systanCommented:
If you are getting "ORA-12154 TNS:could not resolve service name"
then make sure you also copy the sqlnet.ora file contents.
>>riazpk
0
 
hussainkhan22Author Commented:
Hi Can you tell me step by step what all I need to do when I get
"ORA-12154 TNS:could not resolve service name" .

Thanks for your help in advance
0
 
sumit2906Commented:
I do following when get that sort of error:
1) ping <db_host>
2) tnsping <tns alias>
3) If above two are fine then go to db server and check listner
lsntctl status

here I should be able to see that my service is in ready state.

based on the above steps, we can go and check different configuration. you can tell use what are you getting from these steps.
0
 
systanCommented:
hi
Is it fix by my procedures?  How is it?  I want to know why did you accept my comment, did my steps really work?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.