How to generate a tnsnames ora file to connect to an oracle database?

831    Asked by AlastairMcDade in SQL Server , Asked on Sep 29, 2022

 I have installed Oracle 11g, and I can connect as sysman to the Oracle database, but there is no tnsnames.ora file that I can find.Do I need to generate the tnsnames.ora file myself? If so, where do I place it? If not, how does Oracle generate it for me? If I do need to generate it, what is the appropriate syntax for the file?

Answered by ananya Pawar

You can easily create a tnsnames ora [text] file. It should be in $ORACLE_HOME/network/admin/ and should look something like this:


 ORATST=
 (description=
   (address_list=
     (address = (protocol = TCP)(host = fu.bar)(port = 1521))
   )
 (connect_data =
   (service_name=oratst)
 )
)

Your Answer

Interviews

Parent Categories