3 Replies Latest reply on Dec 12, 2017 7:57 AM by Bryce Larsen

    Historical Session ID Field

    Lauren Walker

      I have been running some custom queries to the server workgroup database, to run some usage analysis.  I want to get the number of session run on there server, but can only seem to find the session id for the current day("_sessions"."session_id" ). I am currently waiting on system approval to access to the read only account and get to the sessions table, so it may be that that session id in there is what I am after, however I would have expected it to be available in one of the hist tables.

       

      Can anyone confirm where I would find each session ID for the server?

       

      Thanks

        • 1. Re: Historical Session ID Field
          John Kuo

          I believe the sessions table contains only current sessions. So if no one is logged in then no session id will appear.

           

          Best,

           

          John

          • 2. Re: Historical Session ID Field
            Lauren Walker

            Thanks for your response John.

             

            Yes, I've got access and you are correct, the sessions table only holds the data for current sessions. To work round this I am taking a distinct count of the "historical_events"."id" where "historical_event_types"."type_id" = 1 (server login).

             

            I would be interested if anyone has measured this similarly or used a different method. I am surprised that this is not available in the hist_ tables as they are so comprehensive with other metrics.

            • 3. Re: Historical Session ID Field
              Bryce Larsen

              I've gone for a similar approach as well. Created a SessionID field that is calculated by most recent log-in prior to a view and converting the datetime to a string and adding the User ID to ensure it's distinct. Surprised they don't keep historical session data.