rp_pool_addattrib  rp_pool_cache

Chapter 6: Registered Procedures

rp_pool_addserver

Description

Adds a remote server name to a pool.

Noterp_pool_addserver is not currently support by mutually-aware OpenSwitch servers.

Syntax

rp_pool_addserver pool_name, server [, rel_server, status, position]

Parameters

pool_name

Name of the pool to which the server is being added.

server

Name of the remote server being added to the pool.

rel_server

Name of the server within the pool relative to the server being added.

status

The status of the server being added.

NotePool-specific server status and pool-based failover are not supported by mutually-aware OpenSwitch servers.

Valid status values are:

Value

Description

UP

The server is immediately available for use.

DOWN

The server is unavailable, and is not considered for new client connections to OpenSwitch.

LOCKED

The server is available, but new incoming connections being actively connected through the pool are blocked (or stopped) until the status is changed to UP or DOWN. Blocked connections appear to client applications to be “stuck” until the pool is unlocked.

position

Valid values are:

Value

Description

HEAD

rel_server is ignored, and server is placed at the beginning of the list of servers in the pool

TAIL

rel_server is ignored, and server is placed at the end of the list of servers in the pool. This is the default position if no value is supplied for position.

BEFORE

server is added immediately before rel_server in the list of servers in the pool.

AFTER

server is added immediately after rel_server in the list of servers in the pool.

Examples

Example 1

Adds server SYB_SERV1 to the end of the list of servers associated with POOL_A with no pool-specific server status.

1> rp_pool_addserver "POOL_A", "SYB_SERV1"
2> go

Example 2

Adds server SYB_SERV2 with a DOWN status to a position immediately before SYB_SERV1 in the list of servers associated with POOL_A.

1> rp_pool_addserver "POOL_A", "SYB_SERV2", "SYB_SERV1", DOWN, "BEFORE"
2> go

Example 3

Adds server SYB_SERV3 with status UP as the first server in the list of servers associated with POOL_A.

1> rp_pool_addserver "POOL_A", "SYB_SERV3", NULL, UP, "HEAD"
2> go

Example 4

Adds server SYB_SERV2 to a position immediately before SYB_SERV1 in the list of servers associated with POOL_A. The status of SYB_SERV2 is the status of the DEFAULT server.

1> rp_pool_addserver "POOL_A", "SYB_SERV2", "SYB_SERV1", NULL,"BEFORE"
2> go

Example 5

Adds server “ase3” to a position immediately before the server “ase1” in the list of servers associated with pool POOL1.

1> rp_pool_addserver "POOL1", "ase3", "ase1", NULL, "BEFORE"
2> go

Returns:

rp_pool_addserver: Server ase3 added to pool POOL1
(return status = 0)

Afterward, the rp_pool_help command is issued to display the information below about POOL1, such as status and mode (chained or balanced).

1> rp_pool_help POOL12> go

Returns:

pool_name   mode       cache      status    block       next_server
----------  --------   ---------- --------- ----------- --------------
POOL1       CHAINED    0          UP        0           ase3
(1 row affected)

server_name 
------------------------------- 
ase3
ase1
ase2
(3 rows affected)

attribute     value
------------  --------
(0 rows affected)(return status = 0)

Usage


Messages

See also

rp_pool_create, rp_pool_remattrib, rp_pool_server_status, rp_pool_remserver





Copyright © 2005. Sybase Inc. All rights reserved. rp_pool_cache

View this book as PDF