Oracle: Get list of connected users

Mar 30, 2016 / Updated on Mar 30, 2016

Following query returns the list of users who are currently connected to the Oracle database

SELECT
  username,
  osuser,
  terminal,
  utl_inaddr.get_host_address(terminal) ip_address
FROM
  system.v$session
WHERE
  username is not null
ORDER BY
  username,
  osuser;
comments powered by Disqus
Categories: