New isql command line option --appname

The new isql option --appname allows you to change the default application name isql to the isql client application name. This feature simplifies:

Syntax

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.

NoteYou can also set the client application name in ocs.cfg using the CS_APPNAME property.

Examples

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