Function to close sessions by user
The function
This is helpful when there's 500+ connections active from a user. Currently, I stage the close session statement from user_sessions.
CLOSE_SESSION(session_id)
closes a session based off a session. I'd like to request a function that can close all sessions based on a user name. For example, CLOSE_USER_SESSIONS(user_name)
which would close sessions based on the user_name. This is helpful when there's 500+ connections active from a user. Currently, I stage the close session statement from user_sessions.
0
Comments
For instance, select my_close_session(session_id) over() from sessions where user_name = 'biff';
For instance, select my_close_session(session_id) over() from sessions where user_name = 'biff';
vsql -At -c "select 'select close_session(''' || session_id || ''');' from sessions where user_name = '<user_name>';" | vsql
that will create the statement and pipe it to a new vsql session to be executed.
Hope that makes sense.
Eugenia
While that's a simple work around, a function to handle it would certainly be nice.
I will open a feature request in our ticket system. Thanks,
Eugenia