listener.ora enthält Listener-Name und Protokolladressen über die Verbindungsanforderungen akzeptiert werden und Dienste (Datenbank- und Nicht-Datenbank-Dienste), auf die gehört wird
oracle@tux01:~$ cat > /oracle/product/920/network/admin/listener.ora <<EOF
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost )(PORT = 1521))
)
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/product/920)
(PROGRAM = extproc)
)
)
EOF
Listerner starten
oracle@tux01:~$ lsnrctl start LSNRCTL for Linux: Version 9.2.0.3.0 - Production on 27-AUG-2003 19:34:11 Copyright (c) 1991, 2002, Oracle Corporation. All rights reserved. Starting /oracle/product/920/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 9.2.0.3.0 - Production System parameter file is /oracle/product/920/network/admin/listener.ora Log messages written to /oracle/product/920/network/log/listener.log Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=tux01)(PORT=1521))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 9.2.0.3.0 - Production Start Date 27-AUG-2003 19:34:11 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security OFF SNMP OFF Listener Parameter File /oracle/product/920/network/admin/listener.ora Listener Log File /oracle/product/920/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=tux01)(PORT=1521))) Services Summary... Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully
Listener testen
oracle@tux01:~$ tnsping DB01 TNS Ping Utility for Linux: Version 9.2.0.3.0 - Production on 27-AUG-2003 19:36:52 Copyright (c) 1997 Oracle Corporation. All rights reserved. Used parameter files: /oracle/product/920/network/admin/sqlnet.ora Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))) (CONNECT_DATA = (SID = DB01) (SERVER = DEDICATED))) OK (0 msec)