AppInfo Connection Parameter [Appinfo]

Helps administrators identify the origin of particular client connections from a database server.

Usage

Anywhere

Default

Empty string

Description

This connection parameter is sent to the database server from Embedded SQL, ODBC, or OLE DB clients, as well as DBISQLC on UNIX. It is not available from Open Client.

The parameter consists of a generated string that holds information about the client process, such as the IP address of the client machine, the operating system it is running on, and so on. The string is associated in the database server with the connection, and you can retrieve it using:

SELECT connection_property( 'AppInfo' )

Clients can also specify their own string, which is appended to the generated string. The AppInfo property string is a sequence of semicolon-delimited key=value pairs. The valid keys are as follows:

  • API – DBLIB, ODBC, OLEDB, or ADO.NET (ODBC is returned of the iAnywhere JDBC driver)
  • APPINFO – string entered, if you specified AppInfo in the connection string
  • EXE – name of the client executable (Windows only)
  • HOST – host name of the client machine
  • IP – IP address of the client machine
  • OS – operating system name and version number (for example, Sun Solaris 2.9)
  • PID – process ID of the client
  • THREAD – thread ID of the client
  • VERSION – version of the connection protocol in use, including major and minor values, and a build number (for example 9.0.1.1549)
  • TIMEZONEADJUSTMENT – number of minutes that must be added to the Coordinated Universal Time (UTC) to display time local to the connection

If you specify a debug log file in your client connection parameters, the APPINFO string is added to the file.

Examples

  • Connect to the demo database from Interactive SQL (the iAnywhere JDBC driver is used by default):
    dbisql nogui -c "uid=DBA;pwd=sql" -host MachineName -port 1234

    View the application information:

    SELECT connection_property('AppInfo')

    The result is as follows (in a single string):

    IP=12.345.67.899;
    HOST=MachineName;
    OSUSER=sybase;
    OS='SunOS 5.10 Generic_144489_04';
    EXE='/Sybase/IQ16/shared/JRE-7_0_1/bin/amd64/java';
    PID=0x52af;
    THREAD=0x14;
    VERSION=16.0.0.290;
    API=iAnywhereJDBC;
    TIMEZONEADJUSTMENT=-240
  • Connect to the default database from Interactive SQL, appending your own information to the AppInfo property:
    isql -U DBA -P sql -S MachineName:1234 --appname MyISQL

    View the application information:

    SELECT connection_property('AppInfo')

    The result is as follows (in a single string):

    HOST=MachineName;
    PID=21155;
    EXE=MyISQL