SCAN Listener Commands

Use commands with the scan_listener keyword to add, list the configuration of, modify, enable, disable, start, stop, relocate, obtain the status of, and remove SCAN listeners.

srvctl add scan_listener

Adds Oracle Clusterware resources for the SCAN listeners.

Syntax

srvctl add scan_listener [-netnum network_number] [-listener lsnr_name_prefix] [-skip]
  [-endpoints "[TCP:]port_list[/IPC:key][/NMP:pipe_name]
  [/{TCPS|SDP|EXADIRECT}port_list]"]
  [-invitednodes "node_list"] [-invitedsubnets "subnet_list"]
  [-clientcluster cluster_name] [-clientdata <filename>]

Parameters

Table: srvctl add scan_listener Command Parameters

ParameterDescription
-netnum network_numberThe optional network number from which SCAN VIPs are obtained. If you do not specify this parameter, then the SCAN VIPs are obtained from the same default network from which the nodeapps VIP is obtained.
-listener lsnr_name_prefixThe SCAN listener name prefix.
-skipSkip checking of the ports.
-endpoints "[TCP:] port_list [/IPC: key ] [/NMP: pipe_name ][/{TCPS|SDP|EXADIRECT} port_list ]"

Protocol specifications for the SCAN listener. Use port_list to specify a comma-delimited list of TCP ports or SCAN listener endpoints.

You can also specify endpoints for TCPS, SDP, and EXADIRECT ports.

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

-invitednodes " node_list "A comma-delimited list of host names from outside the cluster that are allowed to register with the SCAN listener.
-invitedsubnets " subnet_list "A comma-delimited list of subnets from outside the cluster that are allowed to register with the SCAN listener. You can specify the subnets using either CIDR notation or wildcards (such as 192.168.*).
-clientcluster cluster_nameThe name of the cluster that is running the SCAN listener you want to share.
-clientdata file_nameThe name of the cluster that is running the shared SCAN listener.

Usage Notes

  • The number of SCAN listener resources created is the same as the number of SCAN VIP resources.
  • This command is only available with Oracle Clusterware.

Example

An example of this command is:

# srvctl add scan_listener -listener myscanlistener

srvctl config scan_listener

Displays the configuration information for all SCAN listeners, by default, or a specific listener identified by network number or ordinal_number.

Syntax

srvctl config scan_listener [[-netnum network_number] [-scannumber ordinal_number]
 [-clientcluster cluster_name] | -all] [-exportfile file_name]

Parameters

Table: srvctl config scan_listener Command Parameters

ParameterDescription
-netnum network_numberUse this parameter to view the configuration of the listener for a specific SCAN VIP.
-scannumber ordinal_numberUse this parameter to specify any one of the three SCAN VIPs, using values from 1 to 3, for which you want to view the configuration of the listener.
-clientcluster cluster_nameThe name of the cluster that is running the shared SCAN listener.
-allAlternative to specifying network or ordinal numbers, you can use this parameter to view the configuration of the listeners for all of the SCAN VIPs.
-exportfile file_nameSpecify the output file to which the resource configuration will be exported in JSON format for backup or resource re-creation purposes.

Usage Notes

This command is only available with Oracle Clusterware.

Example

This command returns output similar to the following:

$ srvctl config scan_listener -scannumber 1

SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1529
Registration invited nodes:
Registration invited subnets:
SCAN Listener is enabled.
SCAN Listener is individually enabled on nodes:
SCAN Listener is individually disabled on nodes:

srvctl disable scan_listener

Disables all SCAN listeners, by default, or a specific listener identified by an ordinal number or client cluster.

Syntax

srvctl disable scan_listener [-netnum network_number] [-scannumber ordinal_number]
  [-clientcluster cluster_name]

Parameters

Table: srvctl disable scan_listener Command Parameters

ParameterDescription
-netnum network_numberUse this parameter to disable SCAN listeners for a specific network number.
-scannumber ordinal_numberUse this parameter to disable any one of the three SCAN VIPs, using values from 1 to 3. If you do not use this parameter, then SRVCTL disables all SCAN listeners.
-clientcluster cluster_nameThe name of the cluster that is running the shared SCAN listener.

Usage Notes

This command is only available with Oracle Clusterware.

Example

The following example disables the SCAN listener identified as 1:

$ srvctl disable scan_listener -scannumber 1

srvctl enable scan_listener

Enables all SCAN listeners, by default, or a specific listener identified by its ordinal number.

Syntax

srvctl enable scan_listener [-netnum network_number] [-scannumber ordinal_number]
  [-clientcluster <cluster_name>]

Parameters

Table: srvctl enable scan_listener Command Parameters

ParameterDescription
-netnum network_numberUse this parameter to enable the listener for a specific SCAN VIP.
-scannumber ordinal_numberUse this parameter to enable any one of the three SCAN VIPs, using values from 1 to 3. If you do not use this parameter, then SRVCTL enables all SCAN listeners.
-clientcluster cluster_nameThe name of the cluster that is running the shared SCAN listener.

Usage Notes

This command is only available with Oracle Clusterware.

Example

The following example enables the SCAN listener identified as 1:

$ srvctl enable scan_listener -scannumber 1

srvctl export scan_listener

Saves the SCAN listener configuration information to a file.

Syntax

srvctl export scan_listener -clientcluster cluster_name -clientdata filename

Parameters

Table: srvctl export scan_listener Command Parameters

ParameterDescription
-clientcluster cluster_nameSpecify the cluster name.
-clientdata filenameSpecify the path to the file to which credentials data will be written.

srvctl modify scan_listener

Modifies the SCAN listener to match that of the SCAN VIP, or modifies the SCAN listener endpoints or service registration restrictions.

Syntax

srvctl modify scan_listener {-update | -endpoints "[TCP:]port_list[/IPC:key]
  [/NMP:pipe_name][/{TCPS|SDP|EXADIRECT}port_list]"} [-invitednodes "node_list"]
  [-invitedsubnets "subnet_list"] [-clientcluster cluster_name]

Parameters

Table: srvctl modify scan_listener Command Parameters

ParameterDescription
-updateUse this parameter to update SCAN listener configuration to match the current SCAN VIP configuration. This parameter adds new resources or removes existing SCAN listener resources to match the number of SCAN VIP resources.
-endpoints "[TCP:] port_list [/IPC: key ] [/NMP: pipe_name ][/{TCPS|SDP|EXADIRECT} port_list ]"

Protocol specifications for the SCAN listener. Use port_list to specify a comma-delimited list of TCP ports or listener endpoints.

You can also specify endpoints for TCPS, SDP, and EXADIRECT ports.

-invitednodes " node_list "Use this parameter to specify a comma-delimited list of host names from outside the cluster that are allowed to register with the SCAN listener.
-invitedsubnets " subnet_list "Use this parameter to specify a comma-delimited list of subnets from outside the cluster that are allowed to register with the SCAN listener. You can specify the subnets using either CIDR notation or wildcards (such as 192.168.*).
-clientcluster cluster_nameThe name of the cluster that is running the shared SCAN listener.

Example

Assume your system currently has a SCAN named scan_name1, and you recently modified the DNS entry to resolve to three IP addresses instead of one. After running the srvctl modify scan command to create additional SCAN VIP resources, use the following command to create Oracle Clusterware resources for the additional two SCAN listeners to go with the two additional SCAN VIPs:

$ srvctl modify scan_listener -update

srvctl predict scan_listener

Predicts the consequences of SCAN listener failure.

Syntax

srvctl predict scan_listener -scannumber ordinal_number [-verbose]

Usage Notes

  • Use the -scannumber parameter to specify any one of the three SCAN listeners for which you want to predict the consequences of a failure. The range of values you can specify for this parameter is 1 to 3.
  • Optionally, you can use the -verbose parameter to display detailed output.

srvctl relocate scan_listener

Relocates a specific SCAN listener from its current hosting node to another node within the cluster.

Syntax

srvctl relocate scan_listener -scannumber ordinal_number [-node node_name]

Usage Notes

  • You can only use this command with Oracle Clusterware.
  • Specify an ordinal number that identifies which SCAN listener you want to relocate. The range of values you can specify for this parameter is 1 to 3.
  • Optionally, you can specify the name of a single node to which you want to relocate the SCAN listener. If you do not specify this parameter, then SRVCTL chooses the node to which the SCAN listener is relocated.

Example

The following example relocates the SCAN listener identified as 3 to node2 of the cluster:

$ srvctl relocate scan_listener -scannumber 3 -node node2

srvctl remove scan_listener

Removes Oracle Clusterware resources from all SCAN listeners.

Syntax

srvctl remove scan_listener [-netnum network_number] [-clientcluster cluster_name]
  [-force] [-noprompt]

Parameters

Table: srvctl remove scan_listener Command Parameters

ParameterDescription
-netnum network_numberThe optional network number from which SCAN VIPs are obtained. If you do not specify this parameter, then the SCAN VIPs are obtained from the same default network from which the nodeapps VIP is obtained.
-clientcluster cluster_nameThe name of the cluster that is running the shared SCAN listener.
-forceRemoves the SCAN listener without stopping the SCAN listener if it is running.
-nopromptUse this parameter to suppress all prompts.

Example

An example of this command is:

$ srvctl remove scan_listener -force

srvctl start scan_listener

Starts all SCAN listeners, by default, or a specific listener on all nodes or a specific node in the cluster.

Syntax

srvctl start scan_listener [-netnum network_number] [-scannumber ordinal_number]
  [-node node_name] [-clientcluster cluster_name]

Parameters

Table: srvctl start scan_listener Command Parameters

ParameterDescription
-netnum network_numberUse this parameter to start SCAN listeners for a specific network number.
-scannumber ordinal_numberUse this parameter to start one of the three SCAN VIPs, using values from 1 to 3. If you do not use this parameter, then SRVCTL starts all SCAN listeners.
-node node_nameSpecify the name of a single node on which you want to start a SCAN listener. If you do not use this parameter, then SRVCTL starts the SCAN listeners on all nodes in the cluster.
-clientcluster cluster_nameThe name of the cluster that is running the shared SCAN listener.

Usage Notes

This command is only available with Oracle Clusterware.

Example

The following example starts the SCAN listener identified as 1:

$ srvctl start scan_listener -scannumber 1

srvctl status scan_listener

Displays the status for all SCAN listeners, by default, or a specific listener.

Syntax

srvctl status scan_listener [[-netnum network_number] [-scannumber ordinal_number]
   | [-clientcluster cluster_name] | -all] [-verbose]

Parameters

Table: srvctl status scan_listener Command Parameters

ParameterDescription
-netnum network_numberThe network number. The default network number is 1.
-scannumber ordinal_numberAn ordinal number that identifies a specific SCAN listener. The range of values you can specify for this parameter is 1 to 3. If you do not use this parameter, then the utility displays the status of all SCAN listeners in the cluster.
-clientcluster cluster_nameThe name of the cluster that is running the shared SCAN listener.
-allDisplay the status for SCAN listeners for all networks.
-verboseDisplay detailed information.

Usage Notes

This command is only available with Oracle Clusterware.

srvctl stop scan_listener

Stops all SCAN listeners, by default, that are in a running or starting state, or a specific listener identified by an ordinal number.

Syntax

srvctl stop scan_listener [-netnum network_number] [-scannumber ordinal_number]
  [-clientcluster cluster_name] [-force]

Parameters

Table: srvctl stop scan_listener Command Parameters

ParameterDescription
-netnum network_numberUse this parameter to stop SCAN listeners for a specific network number.
-scannumber ordinal_numberUse this parameter to stop any one of the three SCAN VIPs, using values from 1 to 3. If you do not use this parameter, then SRVCTL stops all SCAN listeners.
-clientcluster cluster_nameThe name of the cluster that is running the shared SCAN listener.
-forceStops the SCAN listener regardless of any dependencies.

Usage Notes

This command is only available with Oracle Clusterware.

Example

The following example stops the SCAN listener identified as 1:

$ srvctl stop scan_listener -scannumber 1

srvctl update scan_listener

Updates the SCAN listeners to listen on the new endpoints.

Syntax

srvctl update scan_listener

Usage Notes

  • You can only use this command with Oracle Clusterware.
  • This command does not accept any additional parameters, except for -help.