Monday, January 14, 2013

Using Net Configuration Assistant to Configure a Listener

Oracle Net Configuration Assistant (i.e., netca[1] is provided to configure basic network components during database installation[2], including:
  • Listener names and protocol addresses
  • Naming methods the client will use to resolve connect identifiers to connect descriptors
  • Net service names in a tnsnames.ora file 
  • Directory server usage
netca runs automatically during database software installation, as described in your Oracle installation guide.  It can also be run after installation in standalone mode to configure the above-described components in a similar way that is provided during installation.

In this article, we will show you how to configure a new listener named ATGOID using netca.

Running Net Configuration Assistant


Configuration files are typically created in
  • UNIX
    • $ORACLE_HOME/network/admin
  • Windows
    •  %ORACLE_HOME%\network\admin
However, configuration files can be created in a variety of places.  To make sure, the correct configuration files are updated, you can set TNS_ADMIN environment variable on Unix:
  • $ export TNS_ADMIN=/export/home/oracle/atg/Oracle11gR2/product/11.2.0/dbhome_1/network/admin
You also need to specify ORACLE_HOME:
  • $export ORACLE_HOME=/export/home/oracle/atg/Oracle11gR2/product/11.2.0/dbhome_1

Log on to your computer as a member of the administrative group that is authorized to install Oracle software and create and run the database.  To start Oracle Net Configuration Assistant:
  • UNIX
    • Run netca from $ORACLE_HOME/bin
  • Windows
    • Choose Start > Programs > Oracle - HOME_NAME > Configuration and Migration Tools > Net Configuration Assistant


Configuration Steps


Here are our steps to configure a new listener named ATGOID using netca.  Note that highlighted options are our selections.
  1. Welcome
    • Choose the configuration you would like to do:
      • Listener configuration
      • Naming Methods configuration
      • Local Net Service Name configuration
      • Directory Usage Configuration
  2. Listener Configuration, Listener
    • Select what you want to do:
      • Add
      • Reconfigure
      • Delete
      • Rename
  3. Listener Configuration, Listener Name
    • Listener name: ATGOID
  4. Listener Configuration, Select Protocols
    • See Figure 1
  5. Listener Configuration, TCP/IP Protocol
    • Which TCP/IP port number should the listener use? (Default)
  6. Listener Configuration, IPC Protocol
    • To communicate with the database using the IPC protocol, an IPC key value is required.
    • IPC Key value: EXTPROC1522
  7. Listener Configuration, More Listeners
    • Would you like to configure another listener? (No)
  8. Listener Configuration, Select Listener
    • Select a listener you want to start: ATGOID
  9. Listener Configuration Done

Log location


In case there is error found during configuration, you can find more details from the log files located here:
  • $ORACLE_HOME/cfgtoollogs/netca

For example, we have found two files in there:


$ORACLE_HOME/cfgtoollogs/netca
$ ls -lrt
total 60
-rw-r--r-- 1 oracle oinstall 52023 Jan 14 16:49 trace-13011512AM2431.log
-rw-r--r-- 1 oracle oinstall   371 Jan 14 16:49 netca-13011512AM2431.log

Console Ouput


If the configuration succeeded, you should find the following messages from the console:

$ ./netca 

Oracle Net Services Configuration:
Configuring Listener:ATGOID
Listener configuration complete.
Oracle Net Listener Startup:
    Running Listener Control: 
      /export/home/oracle/atg/Oracle11gR2/product/11.2.0/dbhome_1/bin/lsnrctl start ATGOID
    Listener Control complete.
    Listener started successfully.
Oracle Net Services configuration successful. The exit code is 0

listener.ora


After the configuration, configuration file listener.ora located in $TNS_ADMIN folder will be updated.  This configuration file for the  listener may include:
  • Protocol addresses it is accepting connection requests on
  • Database and nondatabase services it is listening for
  • Control parameters used by the listener
In our case, two entries were added in listener.ora:

ATGOID =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1522))
      (ADDRESS = (PROTOCOL = TCP)(HOST = myserver.oracle.com)(PORT = 1521))
    )
  )

ADR_BASE_ATGOID = /export/home/oracle/atg/Oracle11gR2


References

No comments:

Post a Comment