oracle审计日志中提取登录的ipv4,ipv6信息

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/huryer/article/details/87933420
/*
从oracle审计日志中提取登录的ipv4,ipv6信息
ipv4 or ipv6
*/
select os_username, username, userhost, host, count(1) as sl
  from (select os_username,
               username,
               userhost,
               terminal,
               regexp_substr(comment_text,
              '([[:digit:]]+\.?){4}|([[:alnum:]]+\:\:?){4}([[:alnum:]]+\%?){1}([[:digit:]])+') as host
          from DBA_AUDIT_TRAIL
         where timestamp >= trunc(sysdate)
              and action = 100
           and action_name = 'LOGON') a
 group by os_username, username, userhost, a.host

猜你喜欢

转载自blog.csdn.net/huryer/article/details/87933420