rp_cancel

Description

Cancels processing of a client connection.

Syntax

rp_cancel [pool_name, srv_name, spid, why]

Parameters

pool_name

The name of the pool in which the connections should be canceled. Supplying only this argument causes all connections within pool_name to be canceled.

srv_name

Cancels connections to remote server srv_name. Supplying only this argument cancels all connections to srv_name.

spid

Cancels the connection identified within OpenSwitch by spid. If this parameter is specified while pool_name and srv_name are both NULL, OpenSwitch cancels the spid as specified by this parameter.

If either pool_name or srv_name are not NULL, those parameters are verified against the actual pool_name or srv_name of the specified spid. The connection for the specified spid is cancelled only if the supplied pool_name and srv_name exactly match the actual _pool_name and srv_name that the specified spid is connected to. Otherwise, no connection is cancelled.

why

Message to be sent to the user of a canceled query. If you do not supply a message, the default is: “Your query was canceled by administrative request (spid #n)”.

Examples

Example 1

Cancels the OpenSwitch connection represented by spid 8.

1> rp_cancel NULL, NULL, 8
2> go

Example 2

Cancels all connections currently established to pool POOL_A.

1> rp_cancel "POOL_A", NULL, NULL
2> go

Example 3

Cancels all connections currently established to pool POOL_A on server SYB_SERV2, sending the message, “Sorry! Your connection was canceled.” to each user.

1> rp_cancel "POOL_A", "SYB_SERV2", NULL, "Sorry! Your connection was canceled."
2> go

Usage


Messages

See also

rp_kill, rp_who