Adds connection attribute/value pair to a pool.
You can also use OpenSwitch Manager to set pool attributes
for an OpenSwitch server.
rp_pool_addattrib pool_name, attrib, value
Identifies the name of the pool to which the attribute/value pair is to be added.
The name of the attribute to be added to the pool. Table 7-3 shows the valid values.
Attribute |
Description |
---|---|
username |
value must match the user name of an incoming client connection. |
appname |
value must match the application name identified by the incoming client connection. |
hostname |
value must match the host machine name identified by the incoming client connection. |
A standard SQL wildcard expression use to match attrib.
Routes any connection created by a user name beginning with “Sybase” or “sybase” to POOL_A.
1> rp_pool_addattrib "POOL_A", "username", "[sS]ybase%" 2> go
Routes any connection created with an application name of “isql” to POOL_A.
1> rp_pool_addattrib "POOL_A", "appname", "isql" 2> go
Routes any incoming connection from this particular host to POOL_A.
1> rp_pool_addattrib "POOL_A", "hostname", "name of host" 2> go
An attribute/value pair is used to route connections to a pool. At the time a connection is established to OpenSwitch, the attribute of the connection identified by attrib is compared to the regular expression value. If a match is found, the connection is routed to pool_name.
Adding or removing attribute/value pairs from a pool has no effect on existing connections; however, the changes apply to existing connections during a failover.
Both the application name and host name attributes of a client connection must be explicitly set by the client application and cannot actually reflect the real application name and host name that the user is using.
Changes applied to a pool are not reflected in the configuration file. You must manually change the configuration file.
Use rp_pool_help to display the current set of attributes.
The named pool does not exist within OpenSwitch:
rp_pool_addattrib: There is no such pool 'pool_name'.
Use rp_pool_create to create pools. See “rp_pool_create”.
The attribute named “attrib” is invalid:
rp_pool_addattrib: Invalid attribute name 'attrib'.
This message is usually encountered due to an invalid regular expression syntax:
rp_pool_addattrib: Error adding attribute 'attrib' to pool 'pool_name'.
Details can be found in the OpenSwitch error log.
Registered procedure execution succeeded:
rp_pool_addattrib: Attribute successfully added to pool 'pool_name'
rp_pool_create, rp_pool_help, rp_pool_remattrib