srvctl modify listener

Changes the Oracle home directory from which the listener runs, the name of the operating system user who owns Oracle home directory from which the listener runs, the listener endpoints, or the public subnet on which the listener listens, either for the default listener, or a specific listener, that is registered with Oracle Restart or with Oracle Clusterware.

If you want to change the name of a listener, then use the srvctl remove listener and srvctl add listener commands.

Syntax and Parameters

Use the srvctl modify listener command with the following syntax:

srvctl modify listener [-listener listener_name] [-oraclehome oracle_home] 
 [-user user_name] [-netnum network_number]
 [-endpoints "[TCP:]port_list[/IPC:key][/NMP:pipe_name][/TCPS:s_port][/SDP:port]"]

Table A-82 srvctl modify listener Parameters

Parameter Description
-listener listener_name

The name of the listener.

If you do not specify this parameter, then SRVCTL uses the default name LISTENER.

-oraclehome oracle_home

When this parameter is specified, SRVCTL moves the listener to run from the specified Oracle home.

Note: When using this parameter, the command should be run as privileged user to enable SRVCTL to update resource ownership corresponding to the new ORACLE_HOME owner

-user user_name

The name of the operating system user who will own the specified Oracle listener

Note: This parameter can be used only with Oracle Clusterware.

-netnum network_number

This parameter changes the public subnet on which the listener listens.

Note: You should always have at least one listener on the default network. Do not use this parameter to change the network of the only listener that listens on the default network.

-endpoints "[TCP:]port_list [/IPC:key][/NMP:pipe_name]
[/TCPS:s_port][/SDP:port]"

Protocol specifications for the listener. port_list is comma-delimited list of port numbers.

Note: You can modify this attribute using Online Resource Attribute Modification.

Example

The following example changes the TCP ports for the default listener:

$ srvctl modify listener -endpoints "TCP:1521,1522"