on 10-03-2014 3:17 PM
Hi,
I need a query that show me wich application or user is connected to HANA DB.
Can someone help me?
regards Alessandro
Hi Alessandro,
You may use system table M_CONNECTIONS (select * from M_CONNECTIONS) to get connection details, also filter with CONNECTION_STATUS column for current connections.
Refer below documentation for more details (Page 504.):
http://help.sap.com/hana/SAP_HANA_SQL_and_System_Views_Reference_en.pdf
Thanks,
Razal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Mohammed
But i have this pdf and i tryed M_CONNECTIONS view, but it not satisfy what i need.
I need to know how many connection an application do to db HANA.
On SQL SERVER i used sp_who2 view, where there is program name connected to DB.
do you know How i can retrieve what i need ?
regards, alessandro
Hi Alessandro
not sure where sp_who2 takes the program name from, but this is very likely a windows-MSSQL-odbc-driver trick (looking up the image name from the current process and set it by default in the db connection) or something similar.
For most other DBMS, the client application has to provide this information itself.
While the client process ID is set automatically in M_CONNECTIONS additional information (context variable APPLICATION) needs to be set by the client.
The connections overview in SAP HANA Studio provides the APPLICATION* variables together with the connection information.
- Lars
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.