Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

what is difference between tnsnames.ora, listerner.ora and sqlnet.ora

SOLVED
Go to solution
Lalo_Weng
Advisor

what is difference between tnsnames.ora, listerner.ora and sqlnet.ora

Hello,

I have start the database on my server running hp-ux, but don't know how to config network-related files to access this database from another server. I'm confused by the three files under /oracle/network/admin. Anyone can give me a hint? Thanks a lot!
Keep finding is the way.
3 REPLIES
T G Manikandan
Honored Contributor

Re: what is difference between tnsnames.ora, listerner.ora and sqlnet.ora

Oracle listens to client connections using a service which is defined in the listener.ora file.

The net service which are used to connect to databases are defined in the tnsnames.ora file.
For example I connect to a database using system/manager@hp

Here hp is the net service name.
The tnsnames.ora file functions in much the same way as the 'hosts' file in Unix and PC environment. These text files provide the network addressing information to other systems on the network.

The sqlnet.ora file provides the network address to the Oracle Name Server (ONS) for Net connections. ONS provides the same type of service as Domain Name Server (DNS).
The advantage of using ONS is that only one file is to be updated when there is a configuration or a change in the network parameter.


This link can help you

http://www.vi.unizh.ch/oracle8i_816/onlinedocu/doc/network.816/a76933/toc.htm

Thanks
Christian Gebhardt
Honored Contributor
Solution

Re: what is difference between tnsnames.ora, listerner.ora and sqlnet.ora

Hi

tnsnames.ora is needed on clients to find databases. It's something like /etc/hosts on UNIX. It is needed also on the server if you want to connect from the server to the database via sqlnet.

MYNAME.world =
(DESCRIPTION =
(ADDRESS = (PROTOCOL= TCP)(Host = DBHOST)(Port= 1521))
(CONNECT_DATA = (SID = MYSID))
)

So you have a listener running on host DBHOST listening on port 1521 and ORACLE_SID is MYSID and the name of the database on this client is MYNAME. The Connectionstring is

sqlplus user/password@MYNAME


listener.ora is a serverside Configurationscript for the ORACLE-Listener


MYLISTENER =
(ADDRESS_LIST =
(ADDRESS= (PROTOCOL= IPC)(KEY= MYSID))
(ADDRESS= (PROTOCOL= IPC)(KEY= PNPKEY))
(ADDRESS= (PROTOCOL= TCP)(Host= DBHOST)(Port= 1521))
)

On host DBHOST exists a database with SID MYSID and a listener with name MYLISTENER listening on Port 1521 to connect clients to the database.


sqlnet.ora is a script to configure general sqlnet features like domain, tracing and so on (on both clients and server)

regards
Christian
Printaporn_1
Esteemed Contributor

Re: what is difference between tnsnames.ora, listerner.ora and sqlnet.ora

Hi,

if you're running on Xwindows , or do have emulator.
use netasst program under oracle user also can help doing the same thing.
enjoy any little thing in my life