Sets or displays the status of any remote server that is defined in the [SERVER] section of the OpenSwitch configuration file.
You can also use OpenSwitch Manager to view and change
the status of a server.
rp_server_status [server, status]
The name of a remote server as listed in the interfaces file on UNIX, or sql.ini on Windows of OpenSwitch. The server must also be defined in the [SERVER] section of the OpenSwitch configuration file. If a server name is supplied, but the status is not supplied, the status of the specified server is displayed.
The disposition to which the server is to be changed. If status is supplied, but a server is not, then the current status of all servers is changed.
Status |
Description |
---|---|
PRE_UP |
Mutually-aware-specific server status. The server is either in the process of being marked as UP, or has encountered a problem during that process. Check the error log to troubleshoot the problem. After you resolve the problem, manually set the server status to UP on one of the mutually-aware companion OpenSwitch servers. The command will be propagated to the other OpenSwitch companion if it is running. WARNING! Do not manually set a server’s status to PRE_UP. |
UP |
The server is immediately available for use. |
PRE_DOWN |
Mutually-aware specific server status. The server is either in the process of being marked as DOWN, or has encountered a problem during that process. Check the error log to troubleshoot the problem. After you resolve the problem, manually set the server status to DOWN on one of the mutually-aware companion OpenSwitch servers. The command will be propagated to the other OpenSwitch companion if it is running. WARNING! Do not manually set a server’s status to PRE_DOWN. |
DOWN |
The server is unavailable, and is not considered for use by any new client connections established to OpenSwitch. |
PRE_LOCKED |
Mutually-aware specific server status. The server is either in the process of being marked as LOCKED, or has encountered a problem during that process. doing so. Check the error log to troubleshoot the problem. After you resolve the problem, manually set the server status to LOCKED on one of the mutually-aware companion OpenSwitch servers. The command will be propagated to the other OpenSwitch companion if it is running. WARNING! Do not manually set a server’s status to PRE_LOCKED. |
LOCKED |
The server is available, but any new incoming connections actively being connected through the pool are blocked (or stopped) until the status is changed to UP or DOWN. Blocked connections appear to the client applications to have stopped responding until the pool is unlocked. |
Displays the current status of all servers:
1> rp_server_status 2> go
Returns:
server status ------------- -------------- DEFAULT UP SYB_SERV1 UP SYB_SERV2 UP SYB_SERV3 UP
Displays the current status of server SYB_SERV1:
1> rp_server_status "SYB_SERV1" 2> go
Returns:
server status -------------- -------------- SYB_SERV1 UP
Sets the status of SYB_SERV1 to LOCKED:
1> rp_server_status "SYB_SERV1", "LOCKED" 2> go
Returns:
server status ------------------ -------------- SYB_SERV1 LOCKED
Changing the status of a server has no effect on existing connections.
The special server, DEFAULT, applies to all servers that have not had their status explicitly set (either through the configuration file or a call to rp_server_status). That is, if a server that is not currently listed in rp_server_status is added to an existing pool, that server inherits the status of the DEFAULT server.
Connections that are currently blocked on a LOCKED pool continue to remain blocked until either the pool is unlocked or the client application disconnects. This means that any administrative requests made of the connection, such as a call to rp_switch, or rp_stop, are queued until the pool changes status.
The server status set for a pool using rp_pool_server_status or rp_pool_addserver takes precedence over a server’s status set within that pool using rp_server_status.
If a server does not have a pool-specific status, it inherits the generic status set using rp_server_status.
If you issue rp_pool_status to set the pool status on a mutually-aware OpenSwitch server, the command is propagated to the companion OpenSwitch if it is running. The new pool status is also recorded in the mutually-aware configuration tables on the Adaptive Servers. If these steps fail, the pool status is reset to its original value and an error message is logged.
If FREEZE_CFG_ON_FAIL is enabled and the network fails between the local OpenSwitch server and the companion OpenSwitch server, you can use rp_pool_status only to display, not set, a pool’s status. This prevents the companion OpenSwitch servers from switching client connections to different Adaptive Servers while the network between OpenSwitch servers is not responding, which could cause data loss when replication is performed in only one direction. rp_pool_status allows you to reset the pool status when the network is restored between the companion OpenSwitch servers, or if FREEZE_CFG_ON_FAIL is disabled.
The server does not exist within OpenSwitch:
rp_server_status: There is no such server 'server'.
To display a list of existing pools, use rp_server_status with a server parameter of NULL.
This mutually-aware OpenSwitch server has detected a network problem with its companion, and prohibits all future status changes until the network is restored and the status of the companion can be verified:
rp_server_status: Status cannot be set/changed until connectivity is restored with the companion OpenSwitch site or the FREEZE_CFG_ON_FAIL parameter is turned OFF.