sp_configure 'enable real time messaging'

Description

Enables or disables real-time messaging, or displays the current messaging configuration.

Syntax

sp_configure "enable real time messaging"
	[, enable_or_disable]
	[, rtm_provider | drop instance]
	[, instance_name]

Parameters

enable_or_disable

specifies whether or not to enable or disable the "real time messaging" option. Valid values are:

  • 1 – enables real-time messaging.

  • 0 – disables real-time messaging.

If omitted, the current "real time messaging" configuration is returned.

rtm_provider

specifies the type of active messaging provider you are enabling or disabling. Use this parameter when specifying JVMs and cluster servers. Valid values are:

  • eas_jms – enables or disables "real time messaging" for EAServer only.

  • ibm_mq – enables or disables "real time messaging" for IBM MQ only.

  • sonicmq_jms – enables or disables "real time messaging" for SonicMQ JMS only.

  • tibco_jms – enables or disables "real time messaging" for Tibco JMS only.

drop instance

removes the messaging-related configuration option for one instance.

instance_name

is the name of the instance you specify when creating a cluster server environment. If you do not specify this option, the current real-time messaging configuration specifies the cluster-wide option.

Examples

Example 1

Enables real-time messaging for all providers :

sp_configure "enable real time messaging",1

You can then disable this with:

sp_configure "enable real time messaging",0

Example 2

Enables real-time messaging for MQ only:

sp_configure "enable real time messaging", 1 ,ibm_mq

You can then disable this with:

sp_configure "enable real time messaging", 0, ibm_mq

Usage

Using this stored procedure does not overwrite your previous setting. For example, if you enable tibco_jms, then run this stored procedure to enable MQ, both MQ and tibco_jms become enabled. Disabling tibco_jms does not affect MQ, which continues to be enabled.

The enable_or_disable parameter works only if the following are installed and set up correctly:

See the Adaptive Server Installation Guide for details about paths and file names.


Using sp_configure in a cluster environment

The Cluster Edition allows you to configure multiple Adaptive Servers to run as a shared-disk cluster. Multiple machines connect to a shared set of disks and a high-speed private interconnection (for example, a gigabit Ethernet), allowing Adaptive Server to scale using multiple physical and logical hosts.

In the cluster system used in the following examples, clients connect to a shared-disk cluster named “mycluster,” which includes the “ase1,” “ase2,” “ase3,” and “ase4” instances running on machines “blade1,” “blade2,” “blade3,” and “blade4,” respectively. In these examples, a single instance resides on each node.

Figure 3-1: The cluster environment described in the examples for sp_configure.

A diagram showing a cluster environment as described in the examples for sp_configure.

Example 1 Enables real-time messaging for all Active Messaging providers on all instances in the cluster:

sp_configure "enable real time messaging", 1

Example 2 Disables the IBM MQ-only instance “ase1,” if the client is logged in to “ase1”:

sp_configure "enable real time messaging", 0, "ibm_mq", "ase1"

The value of the instance-specific configuration option generated for “ase1” is 26. The configuration value of “real time” is byte, with the different bit representing different real-time features:

Example 3 Displays the instance-specific enable real time messaging configuration option status on the instance “ase1”. The value is 26:

sp_configure "enable real time messaging", null, null, ase1

Example 4 Drops the instance-specific enable real time messaging configuration option on the instance “ase1”. After you run this procedure, “ase1” begins to use the cluster-wide enable real time messaging configuration option, and the status becomes 1.

sp_configure "enable real time messaging", 0, "drop instance", "ase1"

When you run drop instance, the new configuration value is the same as the running value.

Example 5 Displays the cluster-wide enable real time messaging configuration option status. Its value is 1:

sp_configure "enable real time messaging"