hussainkhan22
asked on
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
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)
if good.
2. check your SQLNET.ORA contents (try to make it similar to your company SQLNET.ORA)
ASKER
What is the command to check the tnsnames file is correct or not. What is the command for ping
c:> ping <dbservername>
c:\%ORACLE_HOME%\bin>tnspi ng <database_name>
You can find tnsnames.ora file under ORACLE_HOME\network\admin.
eg:ORACLE_HOME=C:\oracle\p roduct\10. 2.0\db
If you cannot figure it out paste the tnsnames.ora and sqlnet.ora under ORACLE_HOME\network\admin.
c:\%ORACLE_HOME%\bin>tnspi
You can find tnsnames.ora file under ORACLE_HOME\network\admin.
eg:ORACLE_HOME=C:\oracle\p
If you cannot figure it out paste the tnsnames.ora and sqlnet.ora under ORACLE_HOME\network\admin.
try tnsping
c:\tnsping <tns alias>
c:\tnsping <tns alias>
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\driver s\etc\host s" and try.
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\driver
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?
ASKER
# tnsnames.ora Network Configuration File: C:\oracle\product\10.2.0\d b_1\networ k\admin\tn snames.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
# 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
>>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.
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.
ASKER
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.
Generally I see this error
ORA-12154 TNS:could not resolve service name.
What is the solution for this sort of errors.
If you are getting "ORA-12154 TNS:could not resolve service name"
then make sure you also copy the sqlnet.ora file contents.
>>riazpk
then make sure you also copy the sqlnet.ora file contents.
>>riazpk
ASKER
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
"ORA-12154 TNS:could not resolve service name" .
Thanks for your help in advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
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.
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?
Is it fix by my procedures? How is it? I want to know why did you accept my comment, did my steps really work?
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.