on 2015 May 20 3:41 AM
Hello,
i have seen a tool that can list all connections to a sqlanywhere 12 server with name of the client pc and name of the app that has the connection opened at the client. i haven't found a system procedure to list these information. can anybody tell me how to get this information with a sql statement?
kind regards Andreas
Request clarification before answering.
There are several system procedures and functions that can give you the desired information, such as sa_conn_info or the connection property 'AppInfo' - here's a small sample:
select number, name, NodeAddr, connection_property('AppInfo', sci.number)
from sa_conn_info() sci
order by 1
The 'AppInfo' value is a string of concatenated key/value pairs including the program name and the client machine name, you may use another system procedure named sa_split_list() to extract that:
call sa_split_list(connection_property('AppInfo'), ';')
will return each pair in its own row, and you may take the value of the rows with values starting with "HOST=" or "EXE=".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sa_conn_info is a system procedure which lists connections properties. You may use it in two different ways: call it without any parameters
exec sa_conn_infoor use it in a SELECT statement, e.g.
SELECT NodeAddr FROM sa_conn_info ()You can get more detailed information about connections using sa_conn_properties. Among the numerous properties "AppInfo" might be what you're looking for.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
61 | |
8 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.