Entering content frame

 USERS 

Using the system table USERS, you can determine the following database information, among other things:

·        All defined STANDARD users
SELECT username, groupname
  FROM DOMAIN.USERS
    WHERE usermode = 'STANDARD'

·        All users who have not changed their password for over six months
SELECT username, pwcreatedate, pwcreatetime
  FROM DOMAIN.USERS
    WHERE pwcreatedate <= subdate (date,183)

·        All users who are members of a user group and are allowed to log on to the database instance several times simultaneously
SELECT groupname, username, usermode
  FROMDOMAIN.USERS
    WHERE groupname <> username
      AND connectmode = 'MULTIPLE'

·        Name of the database instance on which the current database session was opened. Name of the server on which this database instance is running.
SELECT DISTINCT serverdb, servernode
  FROM DOMAIN.USERS

Currently active user: see CONNECTEDUSERES

 

Leaving content frame