Database Reference
In-Depth Information
The UNIX command hostname returns the host name of the system.
$ ping -c 1 `hostname`
PING dbserver1.oradbpro.com (172.168.0.1) 56(84) bytes of data.
64 bytes from dbserver1.oradbpro.com (172.168.0.1): icmp_seq=0 ttl=64 time=0.072 ms
--- dbserver1.oradbpro.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.072/0.072/0.072/0.000 ms, pipe 2
In the absence of a host name in listener.ora , the TNS Listener uses the host name returned
by the command hostname .
$ lsnrctl start listener_dbserver1
LSNRCTL for Linux: Version 10.2.0.3.0 - Production on 08-SEP-2007 16:32:09
Copyright (c) 1991, 2006, Oracle. All rights reserved.
Starting /opt/oracle/product/db10.2/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.3.0 - Production
System parameter file is /opt/oracle/product/db10.2/network/admin/listener.ora
Log messages written to /opt/oracle/product/db10.2/network/log/listener_dbserver1.lo
g
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.168.0.1)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1521)(IP=FIRST)))
STATUS of the LISTENER
------------------------
Alias listener_dbserver1
Version TNSLSNR for Linux: Version 10.2.0.3.0 - Production
Start Date 08-SEP-2007 16:32:09
Uptime 0 days 0 hr. 0 min. 3 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/db10.2/network/admin/listener.ora
Listener Log File /opt/oracle/product/db10.2/network/log/listener_dbserver1.
log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.168.0.1)(PORT=1521)))
The listener supports no services
The command completed successfully
Of course, the host name could also be omitted in tnsnames.ora , but this is not useful except
on the database server itself, since most of the time clients on remote hosts need to connect to the
database server. On a client system, (HOST=) would be synonymous to (HOST= client_host_name ) ,
which will not allow the client to connect to the TNS Listener on the server.
Search WWH ::




Custom Search