4 Replies Latest reply: Dec 12, 2012 12:11 AM by Kunwar RSS

    why no osuser in DBA_HIST_ACTIVE_SESS_history

    Kunwar
      hi,
      One random question that came to my mind, while i was trying to figure out the osuser for one sql from DBA_HIST_ACTIVE_SESS_HISTORY.

      Why oracle hasnt provided this minor details in form of another column?
      As i understand the v$session details get copied(in a way :) ) to v$active_session_history, so why osuser not?

      Cheers,
      Kunwar
        • 1. Re: why no osuser in DBA_HIST_ACTIVE_SESS_history
          sb92075
          Kunwar wrote:
          hi,
          One random question that came to my mind, while i was trying to figure out the osuser for one sql from DBA_HIST_ACTIVE_SESS_HISTORY.

          Why oracle hasnt provided this minor details in form of another column?
          As i understand the v$session details get copied(in a way :) ) to v$active_session_history, so why osuser not?

          Cheers,
          Kunwar
          ask ORACLE; not here
          • 2. Re: why no osuser in DBA_HIST_ACTIVE_SESS_history
            Dom Brooks
            ASH doesn't preserve all session attributes.
            Perhaps osuser is considered the domain of session audit information?

            From a modelling perspective, most of the attributes on this table relate to what a session is doing at a particular point and are dynamic.
            Not all though but I imagine that is not the driving principle.

            Most significant increments of Oracle version make further additions to this table.

            But, have you ever been using this table and thought "what I really need is osuser".
            That's probably the major factor.
            If you have then maybe there's a valid case for an enhancement request.
            Personally, I haven't.
            • 3. Re: why no osuser in DBA_HIST_ACTIVE_SESS_history
              jgarry
              I speculate it might be because that is something outside of Oracle. The view is sampled data, so some people could come and go without notice, and while some sites might have different os logins, others may only have a few. Look at how many v$sessions are os_user daemon (that seems specific to my odd app) or oracle (or whatever your os does).
              • 4. Re: why no osuser in DBA_HIST_ACTIVE_SESS_history
                Kunwar
                @Dom. Thanks for the reply. I agree with you on this.
                Yes i have been using this view for quite some time.

                Recently i faced a request to check for a performance issue when the application faced a little spike in response time. I got a query running ,which was a resource consuming DML statement.
                The module came to be SQL*Plus. If i had the osuser then i would have been able to pinpoint to the person/group who had run it. On our system each user/group have got a different osuser.

                What do you suggest ,i should have done? Any other alternative?

                sb92075,jgarry thanks guys also for your inputs.