Purpose
The ALL_USERS view displays all database users visible to the current user.
Applicability
This view is available only in OceanBase Database Enterprise Edition.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| USERNAME | VARCHAR2(30) | NO | The username. |
| USERID | NUMBER(38) | NO | The ID of the user. |
| CREATED | DATE | NO | The time when the user was created. |
| COMMON | VARCHAR2(3) | NO | Indicates whether the user is a common user.
NoteThis column is introduced since OceanBase Database V4.2.1 BP2. |
| ORACLE_MAINTAINED | VARCHAR2(1) | NO | Indicates whether the user was created and maintained by using a script provided by OceanBase Database in Oracle mode.
NoteThis column is introduced since OceanBase Database V4.2.1 BP2. |
| INHERITED | VARCHAR2(3) | NO | Indicates whether the user is inherited from other containers.
NoteThis column is introduced since OceanBase Database V4.2.1 BP2. |
| DEFAULT_COLLATION | VARCHAR2(100) | NO | The default character set.
NoteThis column is introduced since OceanBase Database V4.2.1 BP2. |
| IMPLICIT | VARCHAR2(3) | NO | Indicates whether the user was created by an implicit application.
NoteThis column is introduced since OceanBase Database V4.2.1 BP2. |
| ALL_SHARD | VARCHAR2(3) | NO | Indicates whether the user was created with sharding enabled.
NoteThis column is introduced since OceanBase Database V4.2.1 BP2. |
Sample query
obclient> SELECT * FROM SYS.ALL_USERS\G
The query result is as follows:
*************************** 1. row ***************************
USERNAME: SYS
USERID: 200003
CREATED: 29-NOV-23
COMMON: NO
ORACLE_MAINTAINED: N
INHERITED: NO
DEFAULT_COLLATION: USING_NLS_COMP
IMPLICIT: NO
ALL_SHARD: NO
1 row in set (0.001 sec)