SCAN Commands
Use commands with the scan keyword to add, list the configuration of, modify, enable, disable, start, stop, relocate, obtain the status of, and remove SCAN VIPs.
srvctl add scan
Adds Oracle Clusterware resources for the given SCAN.
Syntax
srvctl add scan -scanname scan_name [-netnum network_number]
Parameters
Table: srvctl add scan Command Parameters
| Parameter | Description |
|---|---|
-scanname scan_name | A fully-qualified host name, which includes the domain name. If the network is dynamic, then you do not have to use fully-qualified host name but, if you choose to do so, then the domain must be the GNS subdomain. Note: You can modify this attribute using Online Resource Attribute Modification. |
-netnum network_number | The 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. |
Usage Notes
- This command creates the same number of SCAN VIP resources as the number of IP addresses that SCAN resolves to, or 3 when
network_numberidentifies a dynamic network and Oracle GNS configuration. - For static networks, the addresses to which the SCAN resolves in DNS must match the address type of the subnet.
- For an IPv4 network, the SCAN must resolve to IPv4 addresses.
- This command is only available with Oracle Clusterware.
Example
An example of this command is:
# srvctl add scan -scanname scan.mycluster.example.com
srvctl config scan
Displays the configuration information for all SCAN VIPs, by default, or a specific SCAN VIP identified by ordinal_number.
Syntax
srvctl config scan [[-netnum network_number] [-scannumber ordinal_number] | -all]
[-exportfile file_name]
Parameters
Table: srvctl config scan Command Parameters
| Parameter | Description |
|---|---|
-netnum network_number | Use this parameter to view the configuration of a specific SCAN VIP. |
-scannumber ordinal_number | Use 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. |
-all | Alternative to specifying network or ordinal numbers, you can use this parameter to view the configuration for all of the SCAN VIPs. |
-exportfile file_name | Specify 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 -scannumber 1
SCAN name: mjk12700890090-r, Network: 1
Subnet IPv4: 198.51.100.1/203.0.113.46/eth0, static
Subnet IPv6:
SCAN 1 IPv4 VIP: 198.51.100.195
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes:
SCAN VIP is individually disabled on nodes:
srvctl disable scan
Disables all SCAN VIPs, by default, or a specific SCAN VIP identified by ordinal_number.
Syntax
srvctl disable scan [-scannumber ordinal_number]
Usage Notes
- You can only use this command with Oracle Clusterware.
- Optionally, you can use the
-scannumberparameter to specify any one of the three SCAN VIPs you want to disable. The parameter takes a range of values from 1 to 3.
Example
The following example disables the first SCAN VIP:
$ srvctl disable scan -scannumber 1
srvctl enable scan
Enables all SCAN VIPs, by default, or a specific SCAN VIP identified by its ordinal number.
Syntax
srvctl enable scan [-scannumber ordinal_number]
Usage Notes
- You can only use this command with Oracle Clusterware.
- Optionally, you can use the
-scannumberparameter to specify any one of the three SCAN VIPs you want to enable. The parameter takes a range of values from 1 to 3.
Example
The following example enables the first SCAN VIP:
$ srvctl enable scan -scannumber 1
srvctl modify scan
Modify the number of SCAN VIPs to match the number of IP addresses that the specified scan_name resolves to in DNS.
Use this command when DNS is modified to add, change, or remove IP addresses, and you must adjust the Oracle Clusterware resource configuration to match.
Syntax
srvctl modify scan -scanname scan_name1[,scan_name2] [-netnum network_number] [-skip]
Parameters
Table: srvctl modify scan Command Parameters
| Parameter | Description |
|---|---|
-scanname scan_name | Identifies the SCAN name that resolves to the SCAN VIPs you want to modify. Note: You can modify this attribute using Online Resource Attribute Modification. |
-scanname scan_name1 , scan_name2 | Use this syntax to add a new SCAN name to the existing SCAN resources when the network has two subnets. The scan_name1 must match the existing SCAN name in the network and scan_name2 must resolve in DNS into the same number of IP addresses as scan_name1. |
-netnum network_number | The optional network number from which VIPs are obtained. If not specified, the VIPs are obtained from the same default network from which the nodeapps VIP is obtained. |
-skip | Optionally, you can skip the reachability check of SCAN. |
Examples
Assume your system currently has a SCAN named
scan_name1, and it resolves to a single IP address in DNS. If you modify the SCANscan_name1in DNS to resolve to three IP addresses, then use the following command to create the additional SCAN VIP resources:$ srvctl modify scan -scanname scan_name1- Assume your network has two subnets and you want to add a new SCAN name to be used on another subnet. The original SCAN name,
scan_name1, and the new SCAN name,scan_name2, both resolve in DNS to three IP addresses. To update the SCAN resource configuration for both SCAN names, run the following command:$ srvctl modify scan -scanname scan_name1,scan_name2This command adds
scan_name2to the cluster and ensures that it resolves in DNS to the same number of IP addresses asscan_name1, maintaining consistency across subnets.
srvctl predict scan
Predicts the consequences of SCAN failure.
Syntax
srvctl predict scan -scannumber ordinal_number [-verbose]
Usage Notes
- Specify an ordinal number that identifies the SCAN VIP for which you want to simulate failure. The range of values you can specify for this parameter is 1 to 3.
- Optionally, you can use the
-verboseparameter to display detailed output.
Add additional information about the command here.
srvctl relocate scan
Relocates a specific SCAN VIP from its current hosting node to another node within the cluster.
Syntax
srvctl relocate scan -scannumber ordinal_number [-netnum network_number] [-node node_name]
Parameters
Table: srvctl relocate scan Command Parameters
| Parameter | Description |
|---|---|
-scannumber ordinal_number | Specify an ordinal number that identifies which SCAN VIP you want to relocate. The range of values you can specify for this parameter is 1 to 3. |
-netnum network_number | The optional network number from which VIPs are obtained. If not specified, the VIPs are obtained from the same default network from which the The default network number is 1. |
-node node_name | Optionally, you can specify the name of a single node to which SRVCTL relocates the SCAN VIP. If you do not use this parameter, then SRVCTL chooses the node to which the SCAN VIP is relocated. |
Usage Notes
You can only use this command with Oracle Clusterware.
Example
The following example relocates the first SCAN VIP to node1:
$ srvctl relocate scan -scannumber 1 -node node1
srvctl remove scan
Removes Oracle Clusterware resources from all SCAN VIPs.
Syntax
srvctl remove scan [-netnum network_number] [-force] [-noprompt]
Parameters
Table: srvctl remove scan Command Parameters
| Parameter | Description |
|---|---|
-netnum network_number | The optional network number from which VIPs are obtained. If not specified, the VIPs are obtained from the same default network from which the nodeapps VIP is obtained. |
-force | Removes the SCAN VIPs even though there are SCAN listeners running that are dependent on the SCAN VIPs. |
-noprompt | Use this parameter to suppress all prompts. |
Usage Notes
If you use the -force option, then SCAN VIPs that are running are not stopped before the dependent resources are removed, which may require manual cleanup.
Examples
An example of this command is:
$ srvctl remove scan -force
srvctl start scan
Starts all SCAN VIPs, by default, or a specific SCAN VIP, on all nodes or a specific node in the cluster.
Syntax
srvctl start scan [-scannumber ordinal_number] [-node node_name]
Parameters
Table: srvctl start scan Command Parameters
| Parameter | Description |
|---|---|
-scannumber ordinal_number | Optionally, you can specify an ordinal number that identifies which SCAN VIP you want to start. The range of values you can specify for this parameter is 1 to 3. If you do not use this parameter, then SRVCTL starts all the SCAN VIPs. |
-node node_name | Optionally, you can specify the name of a single node on which the SCAN VIP resides that you want to start. If you do not specify this parameter, then SRVCTL starts the SCAN VIPs on all nodes in the cluster. |
Usage Notes
You can only use this command with Oracle Clusterware.
Example
The following example starts the SCAN VIP identified by the ordinal number 1 on the crm1 node:
$ srvctl start scan -scannumber 1 -node crm1
srvctl status scan
Displays the status for all SCAN VIPs, by default, or a specific SCAN VIP.
Syntax
srvctl status scan [-scannumber ordinal_number] [-verbose]
Usage Notes
- You can only use this command with Oracle Clusterware.
- Optionally, you can specify an ordinal number that identifies a specific SCAN VIP for which you want to display the status. The range of values you can specify for this parameter is 1 to 3. If you do not use this parameter, then SRVCTL displays the status of all SCAN VIPs in the cluster.
- Optionally, you can use the
-verboseparameter to display detailed output.
srvctl stop scan
Stops all SCAN VIPs, by default, that are running or in starting state, or stops a specific SCAN VIP identified by an ordinal number.
Syntax
srvctl stop scan [-scannumber ordinal_number] [-force]
Usage Notes
- You can only use this command with Oracle Clusterware.
- Optionally, you can specify an ordinal number that identifies which SCAN VIP you want to stop. The range of values you can specify for this parameter is 1 to 3. If you do not use this parameter, then SRVCTL stops all the SCAN VIPs.
- Optionally, you can use the
-forceparameter to stop the SCAN VIPs regardless of any dependencies.
Example
The following example stops the SCAN VIP identified by the ordinal number 1:
$ srvctl stop scan -scannumber 1