Cancels processing of a client connection.
rp_cancel [pool_name, srv_name, spid, why]
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.
Cancels connections to remote server srv_name. Supplying only this argument cancels all connections to srv_name.
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.
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)”.
Cancels the OpenSwitch connection represented by spid 8.
1> rp_cancel NULL, NULL, 8 2> go
Cancels all connections currently established to pool POOL_A.
1> rp_cancel "POOL_A", NULL, NULL 2> go
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
Use this procedure with caution. If you do not include any arguments with rp_cancel, all OpenSwitch connections are canceled.
spid refers to the OpenSwitch process ID, not the process ID in the remote Adaptive Server.
To generate a report on the current connections, execute rp_who.
Indicates the number of OpenSwitch connections that were canceled:
rp_cancel: Canceled n spids.
The pool name you supplied does not exist:
rp_cancel: Invalid pool name 'pool_name'.
The server name you supplied does not exist or has not been defined within OpenSwitch:
rp_cancel: Invalid server name 'srv_name'.
rp_kill, rp_who