In this practice you will configure the listener
using Oracle Net Manager and then view the results in the listener.ora file.
For this practice and successive network practices,
the TNS_ADMIN environment variable must point to $HOME/NETWORK/ADMIN
on the host where your UNIX account resides. Look in your profile
(located in your home directory) and search for an entry like this:
Edit the file and add the lines above if they don’t
already exist. Log out and log back in again for the changes to take
Oracle9i client software is not available on your workstation, the
listener.ora file must be edited by hand. Sample networking files can be
found in your $ORACLE_HOME/network/admin/samples directory. Copy
listener.ora from the samples directory to listener.ora in your
$HOME/network/admin directory and edit by hand using vi.
·If this is a single user machine (your personal desktop or
laptop), you can go to %ORACLE_HOME%\network\admin and rename all files from
.ora to .old to preserve them. Later when you have finished the practices, you
can remove your newly created network files and rename the .old back to .ora to
reset your environment.
a listener called listener01 (or any name not currently being used) by using
Oracle Net Manager. The listener must be configured for the server that
contains your Oracle database. The listener must be configured for the TCP/IP
protocol only and must listen for incoming connections on an unused port (ask
your system administrator, or if on a single user machine try 8001.If another process is using it, increment by
1 and try again).
If Oracle9i Net software is loaded on the local PC and the database is on a
different server, the listener configuration file (listener.ora) will be
created on the client PC using Oracle Net Manager and, in later steps,
transferred via FTP or similar file transfer application on the server.
If Oracle9i is
available on the PC, go to the NT Start menu on the client PC, select
Programs > Oracle - Oracle Home > Network Administration >
Oracle Net Manager.
the Local icon in the Net Configuration tree then click the Listeners
folder. Select Create from the Edit menu item, or click the + icon.
name for your listener (listener01) in the Choose Listener Name dialog
box that appears and click OK. The name of the new listener will appear
below the Listeners folder in the left-hand pane of Net Manager.
the new listener name and select Listening Locations from the drop-down
menu on the right-hand pane in Net Manager (if not already selected).
the Add Address button. A tab for the address details of the listener
TCP as the protocol, if not already selected.
the name of the server in the Host field, and the port number assigned
for your listener in the Port field (the port number is provided by your
system administrator). Leave TCP as the default value for the Protocol.
Database Services from the drop-down menu on the right side of the
screen in Net Manager.
the Add Database button. A tab for the database appears, on behalf of
which the listener will listen for incoming connections.
Enter a name for the global
database in the Global Database Name field (the Global Database Name is
directory, defined as your $ORACLE_HOME on
the server, in the Oracle Home Directory field (Issue the env
command from the UNIX prompt to get the home directory or the set
command in NT).
your database system identifier (ORCL for example) in the SID field.
drop-down menu on the right side of the screen in Net Manager, select
“General Parameters” and then choose the “Logging and Tracing” tab. Make
sure logging is enabled and the log file to be used is
configuration by selecting “Save Network Configuration” from the File
menu item in Net Manager.
Move the listener.ora file to the database
server if necessary.
(See NOTE in question 1).
the contents of the listener.ora
file to verify the configuration details.
·$ view listener.ora (you can use more or pg also or notepad in
This completes this
ă Oracle Corporation, 2002
Practice #<number>: <topic title>
Control the listener using the Listener Control Utility (lsnrctl)
In this practice you will use the listener
control utility lsnrctl to start the listener, and set and show some of its
·If your database and listener are on a UNIX
server, you must have permissions to execute the lsnrctl utility. If you do not
have permissions see your system administrator.
you have created the listener.ora file on your computer, then use FTP (ASCII
mode) to transfer it to your $TNS_ADMIN directory on the UNIX server.When the listener.ora file is properly placed,
start your listener by issuing lsnrctl start
listener01 from your prompt.If you encounter difficulties, use the lsnrctl command output and
the listener log file to troubleshoot.
Lsnrctl start listener01 (substitute
your listener name here)
see a list of commands available in the listener control utility, go into
lsnrctl and type help. This will show you the commands available to you in the
listener control utility.
still in the listener control utility, issue the command status
listener01 (substitute your listener name).This will tell you information about your
listener including for which database services it is listening.
LSNRCTL> status listener01 (substitute
your listener name here)