When connecting to Sybase ASE there are connection parameters 'Host' (the machine name of the client) and 'AppName' (the name of the client application). Then while the application is connected, the entry in the sysprocesses table shows those values. I would like to do the same thing for SQL Anywhere if it is possible. If it is possible, would the values appear in the same columns of sysprocesses? My application is written in PowerBuilder. |
SQLAnywhere doesn't have a sysprocesses but the application info you are looking for can be acquired via a different mechanism. See http://dcx.sybase.com/index.html#1201/en/dbadmin/appinfo-connection-conparm.html*d5e18109. I'm hoping to be able to show a list of connected users when the database is running as a server (as opposed to local single user).
(21 Oct '11, 15:12)
Roland Smith
Replies hidden
See sa_conn_info, sa_conn_list and connection_property in the documentation. For example, you might do "select userid, connection_property( 'appinfo', Number ) from sa_conn_info()"
(21 Oct '11, 15:23)
John Smirnios
|
The HOST parameter may be picked up by the data provider. For the Application Name, you can specify this using the AppInfo connection parameter: APPINFO='MyApplication' The value can be viewed as part of: SELECT CONNECTION_PROPERTY('AppInfo'[,connection_id]); |