rp_stop

Description

Stops a group of connections from issuing new queries.

NoteYou can also use the OpenSwitch Manager to stop connections to an Adaptive Server. See “Managing connections to Adaptive Server” for more information.

Syntax

rp_stop [pool_name], [server], [spid], [ign_tran], [ign_fail]

Parameters

pool_name

The name of the pool in which connections are to be stopped. If you do not supply a parameter, or use NULL, all pools are stopped.

server

Indicates that all connections using the remote server are to be stopped. If you do not supply a server name or use NULL, all servers are stopped.

spid

The OpenSwitch process ID of the connection to be stopped. If you do not supply an argument, or use NULL, all connections are stopped.

ign_tran

Indicates whether or not rp_stop ignores transaction state when pausing a connection.

Table 7-12: Values for ign_tran

Value

Description

1

All connections are stopped whether or not they are involved in an open transaction. This is the default value if ign_tran is not supplied.

0

All connections are stopped as soon as they complete their current transaction.

ign_fail

Indicates whether or not stopped connections ignore remote server failures while they are stopped.

Table 7-13: Values for ign_fail

Value

Description

1

If an Adaptive Server actively being used by a stopped connection fails, an attempt is made to reestablish the connection silently without notifying a coordination module when rp_start is issued.

0

If an Adaptive Server actively being used by a stopped connection fails, the normal failover process proceeds for the connection as soon as rp_start is issued. This is the default value.

Examples

Example 1

Stops spid number 8 regardless of the pool or server it is associated with.

rp_stop NULL, NULL, 8

Example 2

Stops all connections currently using remote server SYB_SERV1.

rp_stop NULL, "SYB_SERV1", NULL

Example 3

Stops all connections established through POOL_A.

rp_stop "POOL_A", NULL, NULL

Example 4

Stops all connections established to server SYB_SERV1 through pool POOL_A.

rp_stop "POOL_A", "SYB_SERV1", NULL

Example 5

Stops spid number nine in POOL_A when it is finished with its current transaction.

rp_stop "POOL_A", NULL, 9, 0

Usage


Messages