0

The task is to write a request that will receive the number of connections for the current user. As well as a request that will set a different value for the database SAP HANA. I did not find anything like the network, although for other databases the answer was in the first links. I would be very grateful for any help.

Everything that I managed to get to is this request, but as I understand it, it returns a number of requests available for the entire database

SELECT USER_NAME, COUNT(*) AS CONNECTIONS
FROM SYS.M_CONNECTIONS
WHERE USER_NAME ='your_user'
GROUP BY USER_NAME;

1 Answer 1

0

SAP HANA does not have a function to limit the number of parallel connections that a user account can have open at the same time.

There are options to limit the overall resource consumption (memory and number of worker threads used per statement) of a user but not the number of connections.

Typically, this requirement makes sense in DBMS where each connection allocates a non-trival amount of resources. E.g. PostgreSQL would allocate a whole process for each new session.
This is not the case with SAP HANA - here a user session is only assigned a light-weight HANA-internal "thread" that holds the session context information, but does not automatically allocated large amounts of memory or OS processes.

As for the SQL statement quoted, this returns the current open connections for a single user - not the "...available requests for the whole database...".

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.