Tns and Listener in oracle
LISTENER IN ORACLE:-
- The Oracle Database Listener is the server process that provides basic network connectivity for clients,application servers, and other databases to an Oracle database.
- The Listener can also be configured to execute custom and/or third party binary executables in the operating system.
Examples of Listener.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = sakthidbtech.com)(PORT = 1521))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl.example.com)
(ORACLE_HOME = /u01/app/oracle/product/11.2.0.4/db_1)
(SID_NAME = orcl)
)
)
TNS:-Transparent network substrate.
- This file will also be present on the server if client style connections are used on the server itself.
- The transparent network substrate a proprietary oracle computer network in technology,
- supports homogeneous peer-to-peer connectivity on top of other networking technologies such as tcp/ip and named pipes.
- Tns operates mainly for connection to oracle databases.
TNS EXAMPLES:-
LISTENER = (ADDRESS = (PROTOCOL = TCP)(HOST = sakthidbtech.com)(PORT = 1521))
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = sakthidbtech.com)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
$ # Restart
$ lsnrctl stop
$ lsnrctl start
$ # Or Reload.
$ lsnrctl reload
LISTENER DETAILS
The relevant files for the Listener are as follows –
$ORACLE_HOME/bin/lsnrctl Listener control program
$ORACLE_HOME/network/admin/listener.ora Configuration file for the Listener
$ORACLE_HOME/network/admin/sqlnet.ora Configuration file for the Listener
$ORACLE_HOME/bin/tnslnsr Server Listener process
The "listerner.ora" file contains server side network configuration parameters.
The "sqlnet.ora" file contains client side network configuration parameters.
The "tnsnames.ora" file contains client side network configuration parameters.
The lsnrctl program is the mechanism for starting and stopping the listener process (tnslsnr).
Tnslnsr starts and reads the listener.ora and sqlnet.ora files for configuration information, such as port numbers and
database service names.
SELECT NETWORK_SERVICE_BANNER FROM V$SESSION_CONNECT_INFO;
DBA monitoring can be done remotely in a few ways. Monitoring can be done interactively for each connection. A DBA can connect to a database and review its performance remotely. An alternative is to write a script that collects system performance and health data,
ReplyDeletehttps://genexdbs.com/