Use the command line options described in this section to adjust the behavior of OpenSwitch.
Use the configuration GUI to set these options during or after installation; see Chapter 3, “Configuring OpenSwitch” in the OpenSwitch Installation Guide. You can also set or change these options using a text editor to manually modify the OpenSwitch configuration file. See Chapter 5, “Using the Configuration File.”
-a charset – sets the name of the default character set used during communications between the client connections and OpenSwitch. You can also set this option using the CHARSET configuration option.
-c configuration file – specifies the name of a configuration file to read during start-up. If supplied, this option must be the first option on the command line. All other occurrences of -c are ignored. Portions of the configuration file contents are overridden by any subsequent command line options that you supply.
-C conn_flags – when running the symbolic (debug) version of OpenSwitch (located in $OPENSWITCH/devbin on UNIX and in %OPENSWITCH%\devbin on Windows) and linking with the Sybase instrumented libraries (located in $SYBASE/OCS-15_0/devlib on UNIX and in %OPENSWITCH%\devlib on Windows), you can supply one or more of the flags described below to turn on connection-level debugging.
Value |
Description |
---|---|
a |
All debugging messages |
d |
Diagnostic messages |
p |
Networking protocols |
s |
Protocol state |
-d dbg_log – when used in conjunction with -C and -X, all debugging output is redirected to the file dbg_log, rather than the default OpenSwitch.log.
This option is valid only when running the symbolic (debug) version of OpenSwitch (located in $OPENSWITCH/devbin on UNIX and in %OPENSWITCH%\devbin on Windows) and linking with the Sybase instrumented libraries (located in $SYBASE/OCS-15_0/devlib on UNIX and in %OPENSWITCH%\devlib on Windows).
-e – enables echoing of all message log information is sent to stderr while OpenSwitch is running. All log messages go directly to the log_file.
-E filename – use when encryption is required for the user names and passwords in the OpenSwitch configuration file. By default, -E sends its output to stderr. If the optional file name is given, the output is also sent to the specified file. When the -E flag is used, OpenSwitch prompts you for values for each of the following options in the [CONFIG] section:
ADMIN_USER
ADMIN_PASSWORD
COORD_USER
COORD_PASSWORD
CMON_USER
CMON_PASSWORD
OpenSwitch allows up to 29 cleartext characters to be entered for each request.
-f – enables full pass-through mode for language commands and RPC commands. This mode may improve performance, but disables the server from tracking database context and transaction states during the switching process.
See “[CONFIG]” to configure “full pass-thru
mode” using the FULL_PASSTHRU OpenSwitch
configuration parameter.
-h – prints usage message.
-I interfaces – indicates that OpenSwitch should start using the specified interfaces file on UNIX or sql.ini file on Windows rather than the default $SYBASE/interfaces on UNIX or %SYBASE%\ini\sql.ini on Windows. This option is an uppercase “I”.
-l log_file – sends all OpenSwitch output to log_file rather than the default file of OpenSwitch.log. This option is a lowercase “L”.
-n server_name – specifies the name of the OpenSwitch in the interfaces file; or the Windows sql.ini file. If not supplied, server_name defaults to OPENSWITCH.
-O – when you have MUTUAL_AWARE set to 1, which enables mutually-aware OpenSwitch servers, using -O overrides the data in the Adaptive Server configuration tables with the information from the OpenSwitch configuration file.
-p – allows you to encrypt a particular string. The output is written only to the console. This is useful for applications (such as coordination module applications) where an encrypted user name or password is needed and it is a user name or password that is not processed with the -E option.
-r – enables the resource monitor thread.
-s srv_flags – when OpenSwitch is started using the Sybase-instrumented libraries which are located in $SYBASE/OCS-15_0/devlib on UNIX and in %SYBASE%\OCS-15_0\devlib on Windows, you can use one or more of the flags described in the following table to enable Open Server-level debugging messages.
You can also use the OpenSwitch Manager to set these flags.
Value |
Displays |
---|---|
a |
TDS attention packets |
d |
TDS data information |
e |
Server events |
h |
TDS header information |
m |
Message queue usage |
n |
Network driver information |
p |
Network driver parameter information |
q |
Run queue information |
r |
Network driver data information |
s |
Network driver memory information |
t |
TDS tokens |
w |
TCL wake-up request |
-S stacksize – specifies the stack size for the OpenSwitch server. This overwrites the STACKSIZE setting in the configuration file.
-t dbg_flags – enables OpenSwitch specific debugging messages. Use one or more of the options described below for dbg_flags.
You can also use the OpenSwitch Manager to set these flags.
You can turn these flags on and off at runtime using rp_debug.
Value |
Description |
---|---|
a |
Enables all possible debugging flags. |
b |
Displays attempts to set or test configuration options as described in the configuration file. |
c |
Displays information about result handling of client-side cursors. |
C |
Logs interactions between a mutually-aware OpenSwitch, its companion OpenSwitch, and Adaptive Servers. |
d |
Logs access to data items attached to each thread’s user data. |
D |
Displays information about the handling of dynamic SQL statements. |
e |
Logs all error messages passing through the OpenSwitch error handlers, even those that are normally suppressed. |
f |
Shows connection progress information when OpenSwitch is interacting with the coordination module. |
F |
Display messages related to a coordination module (CM). |
g |
Displays operations involving security negotiations. |
h |
Displays messages when entering each event handler. |
i |
Displays progress information concerning the switching process during a call to rp_switch, such as success or failure of each switch, and which connections fail to go idle within the specified period of time. |
j |
Shows the connection caching activity. |
k |
Displays activity of the timer thread (the thread that is responsible for calling timed callbacks within OpenSwitch). |
l |
Dumps every SQL statement issued through the SRV_LANGUAGE event handler to log_file. |
m |
Displays every memory allocation and de-allocation (more extensive information may be available at compile time). |
n |
Displays receipt and handling of cancel or attention requests from client connections. |
o |
Displays a message each time a command line option value is set or tested. |
p |
Displays manipulation, use, and assignments of server pools. |
q |
Displays information about the connection monitor activity. |
r |
Displays current state and actions of the internal resource monitoring thread. |
R |
Logs interactions between an OpenSwitch and replication coordination modules (RCMs). |
s |
Shows access and release of shared and exclusive internal locks (used to prevent concurrent access to internal data structures). |
S |
Displays the SQL statement that is being executed as part of rp_replay calls. |
t |
Displays activities of the timer thread that is responsible for periodically waking other sleeping threads. |
u |
Displays information about result sets being returned to client threads. |
U |
Logs the user action, such as CUSTOM or MANUAL script execution during a companion OpenSwitch or Adaptive Server failure. |
v |
Logs ping operations and responses from remote machines. |
x |
Displays mutex accesses (more detailed view on shared locks). |
-T – truncates log_file at start-up rather than appending to the end of an existing file.
-u nusers – sets the maximum number of client connections allowed (default is 1000).
-v – displays the OpenSwitch version numbers to stderr, then exits.
-V – disables the validation checks for all configuration options specified in the OpenSwitch configuration file.
The -V option is provided when you start OpenSwitch server, as follows:
./OpenSwitch -c Absolute_path_to_the_configuration_file -V
By default, these validations are turned on if -V is not specified.
For example, MUTUAL_AWARE configuration parameter or option in the OpenSwitch configuration file is a boolean value whose valid values are 0 or 1. When -V option is not specified at server start time, which is the default, the MUTUAL_AWARE option will be validated for the specified value. If the value is neither 0 nor 1, an appropriate error message is displayed and OpenSwitch does not start.
If the -V is specified, then MUTUAL_AWARE option will not be validated for its valid value of either 0 or 1.
-X ctx_flags – when running the symbolic (debug) version of OpenSwitch and linking with the Sybase instrumented libraries located in $SYBASE/OCS-15_0/devlib on UNIX and in %SYBASE%\OCS-15_0\devlib on Windows, you can supply one or more of the flags listing in the following table to turn on context level debugging in the server.
Value |
Description |
---|---|
s |
API state messages |
e |
API error messages |
m |
Memory allocation messages |
n |
Network accesses |