We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


Last Login Time for a user — Vertica Forum

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

 

 

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:

    cat vertica.log|grep "Connection authenticated:" | grep username

    - you will need to do in all nodes to get the latest.

  • Thanks Adrian. 

    This helps me completely.

     

    Regards

    Aadu

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file