Last Login Time for a user
Hi,
I need to find the last login date and time for a user in Vertica Database. Need help on how to do it. I tried using tables like user_Sesssion, session and dc_session_starts, but the older data seems to get flushed after sometime. How can I get the last login date for a user ? I am using Vertica 7.1.2 version.
Regards
Aadu
0
Comments
You can increase your retention policy of the dc table.(but watch the space used).
SELECT get_data_collector_policy('SessionEnds');
get_data_collector_policy
-------------------------------------------------------------------------
100KB kept in memory, 5000KB kept on disk. Time based retention disabled.
SELECT set_data_collector_time_policy('SessionEnds', '7 day'::interval);
set_data_collector_time_policy
------------------------------
SET
SELECT get_data_collector_policy('SessionEnds');
get_data_collector_policy
---------------------------------------------------------------
100KB kept in memory, 5000KB kept on disk. 7 days kept on disk.
Or you can query your vertica.log for the user connection:
- you will need to do in all nodes to get the latest.
Thanks Adrian.
This helps me completely.
Regards
Aadu