IT tutorials
 
Database
 

Oracle Database 11g : Connecting to Oracle - Use the Oracle Net Listener

5/29/2013 7:46:51 PM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
The Oracle Net Listener (listener) listens on a network port (listening endpoints) for incoming database requests. A listening endpoint defines the protocol addresses the listener is defined to listen on. Listening endpoints include HTTP, FTP, WebDAV, and Oracle XML. Look at the ORACLE XML DB Developer’s Guide for more detail on registering FTP, HTTP, and WebDAV listening points.

The process is fairly simple. The listener receives a request and hands the request to a service handler, which is a server process that runs on the same platform as the Oracle database server. The service handler can be a dedicated server or a dispatcher, the latter of which works with shared servers.

The PMON background process registers the service information to the listener. During registration, PMON gives the listener information on the database services and instance information. PMON then tries to register with the listener once the listener has been started. Dynamic registration is supported with the alter system register command. If PMON has not registered with the listener, a TNS listener error will occur. View the Oracle Database 11g Error Messages reference manual for more details.

The listener will receive the database request and spawn a dedicated server process if the environment is configured for the dedicated server architecture. The listener will hand the request over to a dispatcher if running a shared server architecture. A client application can bypass the listener if it is running on the same platform as the database server. Once the listener hands off the request it will resume listening for additional network requests.

A default listener (named listener) is configured at installation with the Oracle Net Configuration Assistant making it easy to start up the default listener when a system is first built. An additional ICP protocol address is defined for external routes (EXTPROC) during installation.

The following is a sample listener.ora file:

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = eclipse)(PORT = 1521))
      )
    )
  )

Table 1 illustrates the contents of the listener.ora file.

Table 1. Listener.ora File Formats
ParameterDescription
DESCRIPTIONThis defines a connect descriptor for a net service name.
DESCRIPTION_LISTThis defines a list of connect descriptors.
LISTENERThis defines the listener alias.
ADDRESSThis defines the listener protocol address.
ADDRESS_LISTThis defines a list of protocol addresses that contain common behavior.

In the following, host defines the server name, PORT defines the port number, SERVER defines the host server name, PIPE defines the pipe name, and KEY defines a unique name for the service. It is recommended that you use the Oracle SID value for the key.

Table 2 defines the components of the protocol definition.

Table 2. Protocol Examples in the listener.ora File
ProtocolExample
TCP(PROTOCOL=tcp)(host=eclipse)(PORT=1521)
TCP/IP with SSL(PROTOCOL=tcps)(host=eclipse)(PORT=2484)
IPC(PROTOCOL=ipc)(KEY=cust)
Named pipes(PROTOCOL=nmp)(SERVER=eclipse)(PIPE=pipe01)
SDP(PROTOCOL=sdp)(host=eclipse)(PORT=1521)

After installation, the Oracle Net Manager can be used to modify the listener configuration. Some of the values that can be configured for the listener include the following:

  • If the default port of 1521 is not specified, the LOCAL_LISTENER initialization parameter needs to be defined through a naming method. The LOCAL_LISTENER parameter is dynamic and can be set with the alter system command.

  • Be careful, because the LISTENER parameter overrides the LOCAL_LISTENER parameter. A host system can have multiple IP addresses, and a listener can be configured to listen on them.

  • The I/O buffer size for send and receive operations can be defined.

  • Heterogeneous services can be set to support additional services such as external routines.

  • The QUEUESIZE parameter can be defined for environments that may have a large number of concurrent connection requests for a listener on a listening endpoint.

Password Authentication

In Oracle 11g, the listener administration is secure through the operating system authentication. So the administration is then restricted to the account that started the listener. Another option is to set a password for the listener. Also for remote administration of the listener a password is required. The change_password command can be used to change a password or set a new password. If a password is not set, someone can accidentally impact the availability of the database—for example, accidentally shutting down the listener. If you don’t have a listener, new sessions cannot be established. It is important that a DBA protect access to listener management.

Using the listener utility, lsnrctl, listener configurations can be managed. The following example sets the listener password:

> lsnrctl
lsnrctl> change_password
Old password: <enter>
New password: newpassword
Reenter new password: newpassword
lsnrctl> save_config

Multiple Listeners

Multiple listeners can be defined for a service and can offer a number of advantages for more complex environments. These advantages include the following:

  • Failover

  • Transparent application failover

  • Load balancing

    The following is a sample connect descriptor for a listener:

(DESCRIPTION =
 (ADDRESS_LIST=
   (ADDRESS=(PROTOCOL=tcp)(HOST=eclipse)(PORT=1521))
  (CONNECT_DATA=
     (SERVICE_NAME=customer.us.beginner.com)))

Connection Pooling

A shared server architecture is used to improve user scalability. So, it is assumed that if this architecture is being used, there is a potential for a large number of users. As mentioned previously, at any point in time there can be a large percentage of idle processes. Connection pooling allows the database server to time out sessions that are idle and then use the connection to support an active session. These sessions remain open but in an idle state. When they become active again, a connection is reestablished.

 
Others
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us