Click here to Skip to main content
15,892,809 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,

I am new at oracle and I am trying to connect to my local oracle database via using TOAD. In order to do that i need a tns file and listener file. But, I could not produce them. Please help me to get a sample tns and listener file and where I should put them.

Thanks in advance.
Posted
Updated 12-Jul-12 21:24pm
v2

1 solution

Here sample with path. You need to map(port, service name, etc) it to your install and place them:
tnsnames.ora file:
# tnsnames.ora Network Configuration File: E:\app\IT\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

SampleConnectionName =
( DESCRIPTION =
   (ADDRESS = (PROTOCOL = TCP)(HOST = IT-PC)(PORT = 1521))
 (CONNECT_DATA =
   (SERVER = DEDICATED)
   (SERVICE_NAME = orcl)
 )
)


listner.ora file:
# listener.ora Network Configuration File: E:\app\IT\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

MyLISTENER =
(DESCRIPTION_LIST =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    (ADDRESS = (PROTOCOL = TCP)(HOST =IT-PC)(PORT = 1521))
  )
)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900