The new isql option --appname allows you to change the default application name isql to the isql client application name. This feature simplifies:
Testing of Adaptive Server cluster routing rules for incoming client connections based on the client application name.
Switching between alternative settings for isql in $SYBASE/$SYBASE_OCS/config/ocs.cfg, such as between debugging and normal sessions.
Identification of the script that started a particular isql session from within Adaptive Server.
isql --appname “application_name”
where application_name is the client application name. You can retrieve the client application name from sysprocesses.program_name after connecting to your host server.
application_name has a maximum length of 30 characters. You must enclose the entire application name in single quote or double quote characters if it contains any white spaces that do not use the backslash escape character. You can set the application_name to an empty string.
You can also set the client application name in ocs.cfg using the CS_APPNAME property.
Example 1 Sets the application name to “isql Session 01”:
isql -UmyAccount -SmyServer --appname "isql Session 01" Password: 1>select program_name from sysprocesses 2>where spid=@@spid 3>go
program_name ------------------- isql Session 01
Example 2 Sets the application name to the name of the script that started the isql session:
isql --appname $0
Example 3 The following sample ocs.cfg file allows you to run isql normally or with network debug information. Because the configuration file is read and interpreted after the command line parameters are read and interpreted, setting CS_APPNAME to isql sets the application name back to isql:
;Sample ocs.cfg file [DEFAULT] ;place holder [isql] ;place holder [isql_dbg_net] CS_DEBUG = CS_DBG_NETWORK ;CS_APPNAME = "isql"
To run isql normally:
isql -Uguest
To run isql with network debug information:
isql -Uguest --appname isql_dbg_net