Stops a group of connections from issuing new queries.
You can also use the OpenSwitch Manager to stop connections
to an Adaptive Server. See “Managing connections to Adaptive Server” for more information.
rp_stop [pool_name], [server], [spid], [ign_tran], [ign_fail]
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.
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.
The OpenSwitch process ID of the connection to be stopped. If you do not supply an argument, or use NULL, all connections are stopped.
Indicates whether or not rp_stop ignores transaction state when pausing a connection.
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. |
Indicates whether or not stopped connections ignore remote server failures while they are stopped.
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. |
Stops spid number 8 regardless of the pool or server it is associated with.
rp_stop NULL, NULL, 8
Stops all connections currently using remote server SYB_SERV1.
rp_stop NULL, "SYB_SERV1", NULL
Stops all connections established through POOL_A.
rp_stop "POOL_A", NULL, NULL
Stops all connections established to server SYB_SERV1 through pool POOL_A.
rp_stop "POOL_A", "SYB_SERV1", NULL
Stops spid number nine in POOL_A when it is finished with its current transaction.
rp_stop "POOL_A", NULL, 9, 0
rp_stop broadcasts a request to all connections matching the pool_name, server, and spid parameters. Each connection polls to see if it has received a stop request immediately before and immediately after processing a new client query, at which time the connection sleeps (or appears to the client to have stopped responding) until an rp_start request is issued.
Use the Open Server registered procedure sp_ps to determine if connections that are not responding are indicated by a Sleep Label of “COORD_STOP.” See the Sybase Open Server documentation for more information about using sp_ps.
In the
return data for sp_ps, the Sleep Label
is a column that describes the sleep event. COORD_STOP
is a status that OpenSwitch sets in the thread when an administrator
or CM stops the threads using cm_stop or rp_stop.
Use rp_start or cm_start to “wake
up” threads that have been put to sleep.
However, since connections only actually respond to an rp_stop request when starting or completing communication with the remote server (for example, a query is issued), COORD_STOP does not display for connections that have remained idle since the request was issued.
rp_stop applies only to connections that are already established to OpenSwitch.
Attempting to stop a connection that is already stopped has no effect.
The supplied pool name does not exist in OpenSwitch:
rp_stop: Invalid pool name 'pool_name'.
Use rp_pool_help to list valid pool names.
The supplied server does not exist in OpenSwitch:
rp_stop: Invalid server name 'server'.
Use rp_server_status to list valid servers.