Creating an Oracle Listener with Oracle Network Configuration Assistant
In order to allow remote connections to an Oracle database the database must be registered with an Oracle Listener. An Oracle Listener is created during the Oracle Database software installation process if a database was created during the installation if not you will need to create a Listener manually.
This document will detail the steps to create an Oracle Listener using the Oracle Network Configuration Assistant. The screen shots are taken from an Oracle Enterprise Linux system with Oracle 11gR2 installed but the process is the same for other host operating systems.
Start the Oracle Network Configuration assistant with
netca. Windows users will find the assistant in there Start Menu | All Programs | Oracle Home | Configuration and Migration tools | Net Configuration Assistant.
The Oracle Network Configuration Assistant includes wizards to Create and Manage an Oracle Listener. Ensure that the Listener configuration option is selected and click the Next button to continue.
On the Listener Operations dialog you have the options to Add, Reconfigure, Delete or Rename the listener. If there are no listeners associated with the
ORACLE_HOME in which
netca was started then the only operation available will be Add. Click the Next button to continue.
Next we provide a name for the listener. The default name is
LISTENER. Provide a name for the Listener and click the Next button to continue.
On the Select Protocols dialog you can select which protocols the Listener will use. TCP is selected by default. Your list of available protocols might be different than what is shown above depending on the host operation system. For this document TCP is the only protocol we are going to use for this Listener. Click the Next button to continue.
The default port number used by an Oracle Listener is 1521. You might need to provide another port number in case the port number is already used or if you have a policy to not use well known default port numbers. Click the Next button to continue.
The port number was the last value we needed to provide. If needed you can configure other Listeners. Ensure that the No option is selected and click the Next button to continue.
The Listener configuration is complete. Click the Next button to complete the Listener configuration wizard and to return the Welcome page. On the Welcome page you can exit the Oracle Network Configuration Assistant by clicking the Finish button.
After you complete the Listener configuration you should see that the configuration completed successfully and that the Listener was started.
[oracle@odlinux ~]$ netca Oracle Net Services Configuration: Configuring Listener:LISTENER Listener configuration complete. Oracle Net Listener Startup: Running Listener Control: /u01/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start LISTENER Listener Control complete. Listener started successfully. Oracle Net Services configuration successful. The exit code is 0 [oracle@odlinux ~]$
You can validate that the Listener is running by issuing
[oracle@odlinux ~]$ lsnrctl status LSNRCTL for Linux: Version 220.127.116.11.0 - Production on 22-AUG-2010 16:43:29 Copyright (c) 1991, 2009, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=odlinux.oracledistilled.com)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 18.104.22.168.0 - Production Start Date 22-AUG-2010 16:36:57 Uptime 0 days 0 hr. 6 min. 33 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora Listener Log File /u01/app/oracle/diag/tnslsnr/odlinux/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=odlinux.oracledistilled.com)(PORT=1521))) The listener supports no services The command completed successfully [oracle@odlinux ~]$
That is all there is to configuring an Oracle Listener. Currently this listener supports no databases services so the next step would be to create a database and register it with the listener.