Translate

রবিবার, ২৪ নভেম্বর, ২০১৩

What is Listener Configuration File? and Configuring and Administering Oracle Net Listener.

What is Listener Configuration File?
Listener is a process that resides on the server whose responsibility is to listen for incoming client  connection requests and manage the traffic to the server.
Every time a client requests a network session with a server, a listener receives the actual request. If the client information matches the listener information, then the listener grants a connection to the server.
listener.ora file.


Assumptions

The example files below are relevant for an Oracle installation and instance with the following values.
Parameter Value
HOST hostname
ORACLE_HOME /u01/app/oracle/product/9.2.0
ORACLE_SID ORCL
DOMAIN world

Listener.ora

The listerner.ora file contains server side network configuration parameters. It can be found in the "$ORACLE_HOME/network/admin" directory on the server. Here is an example of a listener.ora file from Windows 2000.
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
      )
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME = ORCL.WORLD)
      (ORACLE_HOME = /u01/app/oracle/product/9.2.0)
      (SID_NAME = ORCL)
    )
  )
After the "listener.ora" file is amended the listener should be restarted or reloaded to allow the new configuation to take effect.
C:> lsnrctl stop
C:> lsnrctl start

C:> lsnrctl reload

Tnsnames.ora

The "tnsnames.ora" file contains client side network configuration parameters. It can be found in the "$ORACLE_HOME/network/admin" or "$ORACLE_HOME/net80/admin" directory on the client. This file will also be present on the server if client style connections are used on the server itself. Here is an example of a "tnsnames.ora" file.
ORCL.WORLD =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))
    )
    (CONNECT_DATA =
      (SERVICE_NAME = ORCL.WORLD)
    )
  )

Sqlnet.ora

The "sqlnet.ora" file contains client side network configuration parameters. It can be found in the "$ORACLE_HOME/network/admin" or "$ORACLE_HOME/net80/admin" directory on the client. This file will also be present on the server if client style connections are used on the server itself. Here is an example of an "sqlnet.ora" file.
NAMES.DIRECTORY_PATH= (TNSNAMES, ONAMES, HOSTNAME)
NAMES.DEFAULT_DOMAIN = WORLD

# The following entry is necessary on Windows if OS authentication is required.
SQLNET.AUTHENTICATION_SERVICES= (NTS)

Testing

Once the files are present in the correct location and amended as necessary the configuration can be tested using SQL*Plus by attempting to connect to the database using the appropriate username (SCOTT), password (TIGER) and service (ORCL).
$ sqlplus scott/tiger@orcl


1. Set a global_name for the database

When creating a database with 'Oracle Database Configuration Assistant' (DBCA) specify a new, unique global_name.
In the example below I'm using the domain ".ss64.com" you should change this for your own domain name:
global_name
Many small and medium sized companies do everything under a single domain name, in which case these global names may seem like unnecessary work but if you do end up managing multiple domains at some point in the future (e.g. if your company is merged with another company) then having global names in place will make things much easier to manage.
To change the Global_Name of an existing database:
ALTER DATABASE rename global_name to demo.example.com;

2. Configure the Listener

Run 'Oracle Net Manager' on the server, choose Database Services - Add Database and fill in the global_name.
If this fails to work, rename Listener.ora to Listener.OLD and then run 'Oracle Net Manager' again.
Net Manager
File, Save will save this configuration into the Listener.ora file.
Then load Listener.ora into memory to make the settings active
From the OS command line LSNRCTL reload
Alternatively stop and start the listener completely:
LSNRCTL stop
LSNRCTL start

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন

Popular Posts

show

click here