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 or jConnect applications such as the Java version of Interactive SQL (dbisql) or Sybase Central.

It 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 the following statement:

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 – If you specified AppInfo in the connection string, the string entered

  • EXE – The name of the client executable (Windows only)

  • HOST – The host name of the client machine

  • IP – The IP address of the client machine

  • OS – The operating system name and version number (for example, Sun Solaris 2.9)

  • PID – The process ID of the client

  • THREAD – The thread ID of the client

  • VERSION – The version of the connection protocol in use, including major and minor values, and a build number (for example 9.0.1.1549)

  • TIMEZONEADJUSTMENT – The 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 -c "uid=DBA;pwd=SQL;dbf=C:\Program Files\Sybase\IQ-15_3\demo\iqdemo.db"

    View the application information:

    SELECT connection_property('AppInfo')

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

    IP=10.25.99.116;
    HOST=machine-name;
    OSUSER=smith;
    OS="Windows XP Build 2600 Service Pack 3";
    EXE=C:\\Program Files\\Sybase\\IQ-15_3\\bin32\\dbisql.exe;
    PID=0x108c;
    THREAD=0x124c;
    VERSION=11.0.1.5538;
    API=iAnywhereJDBC;
    TIMEZONEADJUSTMENT=-300
  • Connect to the default database from Interactive SQL, appending your own information to the AppInfo property:

    dbisql -c "uid=DBA;pwd=SQL;app=ISQL connection"

    View the application information:

    SELECT connection_property('appinfo')

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

    HOST=machine-name;
    OS=Sun_Solaris 2.8;
    PID=0x10e;
    THREAD=0xe1;
    VERSION=9.0.1.1549;
    TIMEZONEADJUSTMENT=-300
    APPINFO=ISQL connection