Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 453
  • Last Modified:

Count of Connects by User in the Last Week

When i query this SQL Statement

SQL> SELECT das.username,
  2         COUNT(*) logonCount
  3    FROM sys.dba_audit_session das
  4   WHERE das.timeStamp > SYSDATE-7
  5     AND das.returnCode = 0
  6   GROUP BY das.username;


USERNAME   LOGCOUNT
TEST              11
DBA               16
DECV               8
USER1             2
TEST                2

would like to see where the connects are coming from. ?
0
Cha1tu
Asked:
Cha1tu
  • 2
1 Solution
 
jason987Commented:
Maybe das.USERHOST or das.TERMINAL has the information you want?
0
 
Cha1tuAuthor Commented:
WHEN I EDIT THIS


SELECT das.username,
       das.USERHOST,
       das.TERMINAL,
           COUNT(*) logonCount
         FROM sys.dba_audit_session das
        WHERE das.timeStamp > SYSDATE-7
       AND das.returnCode = 0
       GROUP BY das.username;


please the results in the attached file New-Microsoft-Word-Document.doc
0
 
jason987Commented:
SELECT das.username,
       das.USERHOST,
       das.TERMINAL,
           COUNT(*) logonCount
         FROM sys.dba_audit_session das
        WHERE das.timeStamp > SYSDATE-7
       AND das.returnCode = 0
       GROUP BY das.username,das.USERHOST,
       das.TERMINAL;
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now