Users, Roles, Privileges, and Sessions

The user access grants are organized by authorization groups.

sys.auths

nametypereferencesdescription
"id"INTEGERThe unique authorization identifier.
"name"VARCHARThe SQL authorization name of the user or role.
"grantor"INTEGERsys.auths.id when grantor > 0The corresponding authorization grantor.

sys.users and sys.db_user_info

nametypereferencesdescription
"name"VARCHARsys.auths.nameThe unique user login name.
"fullname"VARCHARFull name of user.
"default_schema"INTEGERsys.schemas.idThe default schema for this user.

sys.roles

nametypereferencesdescription
"id"INTEGERThe unique role identifier.
"name"VARCHARThe role name.
"grantor"INTEGERsys.auths.id when grantor > 0The corresponding authorization grantor.

sys.user_role

nametypereferencesdescription
"login_id"INTEGERsys.auths.idThe corresponding user identifier.
"role_id"INTEGERsys.roles.idThe corresponding role identifier.

sys.privileges

nametypereferencesdescription
"obj_id"INTEGERsys.ids.idThe identifier of the object for which privilege(s) are given to a certain user or role.
"auth_id"INTEGERsys.auths.idThe id of the user or role.
"privileges"INTEGERsys.privilege_codes.privilege_code_idPrivileges classification code, see table sys.privilege_codes.
"grantor"INTEGERsys.auths.id when grantor > 0The corresponding grantor authorization identifier.
"grantable"INTEGERPermission to pass privilege rights to other users or roles.

sys.privileges_codes

nametypereferencesdescription
"privilege_code_id"INTEGERThe unique internal code of a privilege or combination of privileges.
"privilege_code_name"VARCHARA description of the privilege(s) associated with this code.

sys.sessions

nametypereferencesdescription
"sessionid"INTEGERThe internal session identifier.
"username"VARCHARsys.users.nameThe name of the user who created the session.
"login"TIMESTAMPThe login start timestamp of the session.
"idle"TIMESTAMPThe timestamp of the session.
"optimizer"VARCHARsys.optimizers.nameThe optimizer pipeline name.
"sessiontimeout"INTEGERThe session timeout time in milliseconds, 0 means timeout is disabled.
"querytimeout"INTEGERThe query execution timeout time in milliseconds, 0 means timeout is disabled.
"workerlimit"INTEGERThe maximum number of worker threads allowed, 0 means limit is disabled.
"memorylimit"INTEGERThe memory limit in MB for this session, 0 means limit is disabled.

Note: The sys.sessions structure has been enhanced from release Jun2020 (11.37.7) onwards. Older versions will show less and some different columns.