Oracle

Oracle Net8 Configuration TNSnames.ora Listener connection-20

Advertisements

Net8 Configuration

Net8 is to establish network sessions and transfer data between machines..

Net8 is important to connect the database from remote. Server à server, server à client & application à server vice versa.

Ex:

192.168.200.7 – client (Oracle software needed)

Entries of S/W: TNSnames.ora& & SQLnet.ora- optional

192.168.200.107 – Server (Oracle software & DB needed)

Entries of S/W: TNSname.ora, listener & SQLnet.ora- optional

 

TNSnames.ora

Configuration file that defines databases addresses for establishing connections to them like (Host, DB name & port). It located on both client and server systems.

SQLnet.ora

The sqlnet.ora file is the profile configuration file. It resides on the client machines and the database server.  We can configure some client setting and restrictions. Like (tracing options, default domain, encryption, etc)

Listener

It’s a configuration file used to configure Oracle Database Listeners (required to accept remote connection requests).

 

Where all the files will be stored

Linux à $ORACLE_HOME/network/admin

Windows à %ORACLE_HOME%/network/admin

On client side:

$ vi tnsnames.ora

Test = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.200.107) (PORT=1521)) (CONNECTION_DATA = (SERVICE_NAME=TESTDB)))

Test – Is the net service name , can be anything.

TestDB – DB name

How to check the entries are valid

$ tnsping test

 

Common errors:

 

TNS could not resolve the service name àNet service name is wrong.

TNS request timed out àClient to server network break. Mostly in windows because  of firewall ON, we need to  disable.

TNS protocol adapter error à Oracle service down.

TNS packet writer failure à Network bandwidth low.

In some cases, If oracle uses more than ½ of the RAM, we will receive this error.

TNS no listener  à Listener stopped.

$ lsnrctl status

$ lsnrctl start/stop/reload

Reload – Will help the downtime, in case of any modification on the listener can be reloaded instead of stop and start.

Listener

Oracle Net Listener is a separate process that runs on the database server computer. It receives incoming client connection requests and manages the traffic of these requests to the database server.

Create listener on server by NETMGR

$ netca à it will open a window à next and next we need to enter listener info.

 

Net manager – NETMGR

It’s a utility.

Oracle Net Manager is a utility used for configuring SQL*Net. It is similar to NetCA, but Net Manager allows you to perform more complex connectivity configurations.

On client side, $ netmgr it will open a window à we need to enter service, DB names & port.

I’m currently working as a SQL server DBA in one of the top MNC. I’m passionate about SQL Server And I’m specialized in Administration and Performance tuning. I’m an active member of SQL server Central and MSDN forum. I also write articles in SQL server Central. For more Click here

Leave a Reply

Your email address will not be published. Required fields are marked *

66 + = 71