2011-09-13

Teradata - Session information


-- 1. All sessions, for all users.
select
      *
from
      DBC.SESSIONINFO
where
      UserName like any ( 'SQL17%', '213061%' )
order by
      UserName asc
;


-- 2. Current session information.
SELECT
      HostNo
      ,UserName
      ,SessionNo
      ,LogonDate
      ,LogonTime
      ,LogonSequenceNo
      ,LogonSource
FROM
      dbc.SessionInfoVX
WHERE
      SessionNo = ( select session )
;

No comments:

Post a Comment