ONS Commands
Use commands with the ons keyword to manage only Oracle Notification Service instances for Oracle Restart.
You can add, configure, enable, start, obtain the status of, stop, disable, and remove Oracle Notification Service instances for Oracle Restart.
srvctl add ons
Adds an Oracle Notification Service daemon to an Oracle Restart configuration.
Syntax
srvctl add ons [-emport em_port] [-onslocalport ons_local_port] [-onsremoteport ons_remote_port]
[-remoteservers host[:port][,host[:port]...]]
[-clientcluster cluster_name] [-clientdata filename]
Parameters
Table: srvctl add ons Command Parameters
| Parameter | Description |
|---|---|
-emport em_port | Local listen port for Oracle Enterprise Manager. The default port number is 2016. |
-onslocalport ons_local_port | Optionally, you can specify the Oracle Notification Service daemon listening port for local client connections. Note: The local port and remote port must each be unique. |
-onsremoteport ons_remote_port | Optionally, you can specify the Oracle Notification Service daemon listening port for connections from remote hosts. Note: The local port and remote port must each be unique. |
-remoteservers host [: port ][ host [: port ]...] | Optionally, you can specify a comma-delimited list of Note: If |
-clientcluster cluster_name | The name of the cluster that is running the shared SCAN listener. |
-clientdata filename | Specify the path to the file to which credentials data will be written. |
Usage Notes
You can only use this command with Oracle Restart.
Example
An example of this command is:
$ srvctl add ons -onslocalprt 6200
srvctl config ons
Displays configuration information for the Oracle Notification Service daemon.
Syntax
srvctl config ons [-all] [-clientcluster cluster_name] [-exportfile file_name]
Usage Notes
- You can only use this command with Oracle Restart.
- You can display the configuration for all ONS daemons, or those for a specific client cluster.
srvctl disable ons
Disables the Oracle Notification Service (ONS) daemon for Oracle Restart installations.
Syntax
srvctl disable ons [-clientcluster cluster_name] [-verbose]
Usage Notes
- You can only use this command with Oracle Restart.
- You can disable all ONS daemons, or those for a specific client cluster.
- Optionally, you can use the
-verboseparameter to display detailed output.
srvctl enable ons
Enables the Oracle Notification Service daemon.
Syntax
srvctl enable ons [-clientcluster cluster_name] [-verbose]
Usage Notes
- You can only use this command with Oracle Restart.
- You can enable all ONS daemons, or those for a specific client cluster.
- Optionally, you can use the
-verboseparameter to display detailed output.
srvctl export ons
Exports ONS server information into a file.
Syntax
srvctl export ons -clientcluster cluster_name -clientdata filename
Parameters
Table: srvctl export ons Command Parameters
| Parameter | Description |
|---|---|
-clientcluster cluster_name | Specify the cluster name. |
-clientdata filename | Specify the path to the file to which credentials data will be written. |
srvctl modify ons
Modifies the ports used by the Oracle Notification Service daemon that is registered with Oracle Restart.
Syntax
srvctl modify ons [-emport em_port] [-onslocalprt ons_local_port] [-onsremoteport ons_remote_port]
[-remoteservers host[:port][,host[:port],...]]
[-clientcluster cluster_name] [-verbose]
Parameters
Table: srvctl modify ons Command Parameters
| Parameter | Description |
|---|---|
-emport em_port | Optionally, you can specify the local port on which Oracle Enterprise Manager listens. The default port is 2016. |
-onslocalprt ons_local_port | Optionally, you can modify the Oracle Notification Service daemon listening port for local client connections. Note: The local port and remote port must each be unique. |
-onsremoteport ons_remote_port | Optionally, you can modify the Oracle Notification Service daemon listening port for connections from remote hosts. Note: The local port and remote port must each be unique. |
-remoteservers host [: port ][, host [: port ],...] | Optionally, you can specify a list of Note: If you do not specify |
-clientcluster cluster_name | The name of the cluster that is running the shared SCAN listener. |
-verbose | Optionally, you can use this parameter to display detailed output. |
Usage Notes
You can only use this command with Oracle Restart.
Example
An example of this command is:
$ srvctl modify ons -onslocalprt 6203
srvctl remove ons
Removes Oracle Notification Service from the Oracle Grid Infrastructure home.
Syntax
srvctl remove ons [-clientcluster cluster_name] [-force] [-verbose]
Usage Notes
- You can only use this command with Oracle Restart.
- If using the shared SCAN feature, then use the
-clientclusterparameter to specify the name of the cluster that is running the shared SCAN listener. - Optionally, you can use the
-forceparameter to remove Oracle Notification Service regardless of dependencies. - Optionally, you can use the
-verboseparameter to display detailed output.
srvctl start ons
Starts the Oracle Notification Service daemon.
Syntax
srvctl start ons [-clientcluster cluster_name] [-verbose]
Usage Notes
- You can only use this command with Oracle Restart.
- You can enable all ONS daemons, or those for a specific client cluster.
- Optionally, you can use the
-verboseparameter to display detailed output.
srvctl status ons
Displays the current state of the Oracle Notification Service daemon.
Syntax
srvctl status ons [-clientcluster cluster_name]
Usage Notes
- You can only use this command with Oracle Restart.
- You can display the status for all ONS daemons, or those for a specific client cluster.
srvctl stop ons
Stops the Oracle Notification Service daemon.
Syntax
srvctl stop ons [-clientcluster cluster_name] [-force]
Usage Notes
- You can only use this command with Oracle Restart.
- You can stop all ONS daemons, or those for a specific client cluster.
- Optionally, you can use the
-forceparameter to stop the ONS daemons regardless of any dependencies.