This section of the configuration file defines the set of remote servers available for use within pools. Use this section to predefine the disposition of a server before you start OpenSwitch.
Complete the [SERVER] parameters once for each remote server to be accessed.
[SERVER=SERVER_NAME] OPTION = VALUE OPTION = VALUE CMON_USER = CMON user name CMON_PASSWORD = CMON password
SERVER_NAME – the name of the remote server as listed in the $SYBASE/interfaces file on UNIX and in the %SYBASE%\sql.ini file on Windows.
A value of DEFAULT
sets
the default values for any server not explicitly listed in a this
section.
OPTION and VALUE – additional parameters specific to SERVER_NAME. Table 5-2 shows valid input for these parameters, which are entered in the format:
OPTION=VALUE
OPTION |
VALUE |
---|---|
CFG_STORAGE |
When this property is set for an Adaptive Server, that Adaptive Server is used to store the configuration information of the mutually-aware OpenSwitch clusters.
In a mutually-aware setup, you must include this parameter under the two Adaptive Server entries; for example: [SERVER=ASE1] STATUS=UP CFG_STORAGE=1 [SERVER=ASE2] STATUS=UP CFG_STORAGE=1 See Chapter 6, “Using Mutually-aware OpenSwitch Servers,” for more information. |
STATUS |
Enter the status of the server, which is the state of the server within OpenSwitch:
Servers can also have a PRE_UP, PRE_DOWN, or PRE_LOCKED status. These are states specific to mutually-aware OpenSwitch servers. Never manually set a server’s status to these states. For more information, see “Server state”.
|
TYPE |
If the server in a pool is HA-enabled, enter HA for this parameter. If the server is not HA-enabled, you can exclude this parameter or leave it blank. If the server is in an Adaptive Server HA cluster, verify this property is set to “HA” in that Adaptive Server [SERVER] sections. For example: [CONFIG] HAFAILOVER = 1 CMON_USER = cmon_user CMON_PASSWORD = cmon_password [SERVER = nlatke_ASE1] STATUS = UP TYPE = HA |
CMON_USER – the user login used by the connection monitor (CMON) thread to connect to the back-end server. This must be an existing, valid login on each of the Adaptive Servers being used. Verify this user has basic privileges and can issue a “wait for delay” query to the remote data serve.
This value supersedes the value you set for CMON_USER in the [CONFIG] section. If you do not set a value here, OpenSwitch uses the value you set for CMON_USER in the [CONFIG] section.
Also, if the CMON_USER is not a valid Adaptive Server user, the client can be left in an undefined state when OpenSwitch is configured for failover mode and a failover occurs to the secondary Adaptive Server. Be sure to specify a valid CMON user name and that the user is a valid Adaptive Server user.
If the USERNAME_PASSWORD_ENCRYPTED option
is set to 1
, this should contain
the encrypted string of the CMON user name. To encrypt a user name,
use the -E or -p command line
options.
CMON_PASSWORD – the password for the CMON_USER. The default is an empty string.
This value supersedes the value you set for CMON_PASSWORD in the [CONFIG] section. If you do not set a value here, OpenSwitch uses the value you set for CMON_PASSWORD in the [CONFIG] section.
In the example above, the latest OpenSwitch configuration is always stored in the syso_<cluster> table in ASE1 and ASE2 (as long as they are running and connected). Therefore, when a mutually-aware OpenSwitch server fails to connect to its companion OpenSwitch for the latest configuration information, it queries both ASE1 and ASE2 to retrieve that information.
[SERVER=ASE1] STATUS = UP CFG_STORAGE = 1 TYPE = HA CMON_USER = ASE1usr CMON_PASSWORD = ASE1pwd [SERVER=ASE2] STATUS = UP CFG_STORAGE = 1 CMON_USER = sa CMON_PASSWORD = sa