A network object is identified by a protocol address. When a connection is made, the client and the receiver of the request (listener or Oracle Connection Manager) are configured with identical protocol addresses.
The client uses this address to send the connection request to a particular network object location, and the recipient "listens" for requests on this address, and grants a connection based on its address information matching the client information.
This chapter contains the following topics:
The protocol address is comprised of ADDRESS and ADDRESS_LIST elements.
To define a protocol address.
Put this parameter under an ADDRESS_LIST
or DESCRIPTION
parameter. A DESCRIPTION
is used in a tnsnames.ora
or a listener.ora
file.
(ADDRESS= (PROTOCOL=tcp) (HOST=sales-server) (PORT=1521))
See Also:
"Protocol Parameters" for each protocol's required parametersThe listener and Oracle Connection Manager are identified by protocol addresses. Table 4-1, "Protocol-Specific Parameters" lists the parameters used by the Oracle protocol support.
Table 4-1 Protocol-Specific Parameters
Protocol | Parameter | Description |
---|---|---|
Specify |
||
Specify a unique name for the service. Oracle recommends using the service name or the Oracle System Identifier (SID) of the service. Example: (PROTOCOL=ipc)(KEY=sales) |
||
Specify |
||
Specify the name of the Oracle server. |
||
Specify the pipe name used to connect to the database server. This is the same Example: (PROTOCOL=nmp)(SERVER=sales)(PIPE=dbpipe0) |
||
Specify |
||
Specify the host name or IP address of the computer. |
||
Specify the listening port number. Example: (PROTOCOL=sdp)(HOST=sales-server)(PORT=1521) (PROTOCOL=sdp)(HOST=192.168.2.204)(PORT=1521) |
||
Specify |
||
Specify the host name or IP address of the computer. |
||
Specify the listening port number. Example: (PROTOCOL=tcp)(HOST=sales-server)(PORT=1521) (PROTOCOL=tcp)(HOST=192.168.2.204)(PORT=1521) |
||
Specify |
||
Specify the host name or IP address of the computer. |
||
Specify the listening port number. Example: (PROTOCOL=tcps)(HOST=sales-server)(PORT=2484) (PROTOCOL=tcps)(HOST=192.168.2.204)(PORT=2484) |
Table 4-2, "Recommended Port Numbers" lists the recommends the port numbers.
Table 4-2 Recommended Port Numbers
Port | Description |
---|---|
Default listening port for client connections to the listener. This port number may change to the officially registered port number of 2483 for TCP/IP and 2484 for TCP/IP with SSL. |
|
1521 |
Default and officially registered listening port for client connections to Oracle Connection Manager. |
1830 |
Default and officially registered listening port for administrative commands to Oracle Connection Manager. |
Oracle allows port numbers from 1 to 65535. However, many operating systems reserve port numbers less than 1024. For example, on certain operating systems, only privileged processes can listen for TCP connections on ports less than 1024.
If you need to configure listener to listen on a port number less than 1024, then do the following:
Note:
Your operating system may require a different procedure.Use Oracle Net Configuration Assistant or Oracle Net Manager to configure the listener with protocol addresses and other configuration parameters.
Log in as the root
user on the machine that has the listener.
Set file ownership and access permissions for the listener executable (tnslsnr
) and the dependent shared libraries so that these files can be modified only by the root
user.
Ensure that the permissions of the individual directories found in the path names to these files, starting with the root directory have the same ownership and access permissions.
Start the listener as the root
user.
Enter the following command at the system prompt:
tnslsnr listener_name -user user -group group
In the preceding command, the following options are used:
Table 4-3 tnslsnr Utility Options
Options | Description |
---|---|
listener_name |
Specify the name of the listener. If omitted, then the default name |
user |
Specify the user whose privileges the listener will use when super user ( |
group |
Specify the group whose privileges the listener will use when super user ( |
During this step, the listener switches to the specified user and group. All operations are done with the specified user and group privileges, except the system calls necessary to listen on configured endpoints. The listener reverts to the root
user to listen on reserved addresses, such as TCP ports less than 1024.
After the listener starts listening on all of its endpoints configured in listener.ora
, it switches to the specified user and group irreversibly. Therefore, the listener will give up the root
privilege that it initially had. The -user
and -group
command line arguments only accept user and group identifiers specified in numeric form.
For example, to run a listener with root privileges called mylsnr
and have it use privileges of a user identified as 37555 with a group identifier of 16, enter the following at the operating system command prompt:
tnslsnr mylsnr -user 37555 -group 16
In the preceding example, 37555 could be the identifier for the oracle
user, and 16 could be the identifier for the dba
group.
After the listener has been started, you can administer it with the Listener Control utility.
Important Notes:
Oracle recommends that the user which the listener process runs be the oracle
user, or a user that the listener process normally runs on the operating system.
Do not leave the listener process running as the root
user because doing so is a security vulnerability.