Note
This view was introduced in OceanBase Database V4.2.1 BP2.
Purpose
The USER_USERS view displays the information about the current user.
Applicability
This view is available only in OceanBase Database Enterprise Edition.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| USERNAME | VARCHAR2(128) | NO | The name of the user. |
| USERID | NUMBER(38) | NO | The ID of the user. |
| ACCOUNT_STATUS | VARCHAR2(32) | NO | The account status. Valid values:
|
| LOCK_DATE | DATE | NO | The date when the account was locked if the account status was LOCKED. |
| EXPIRY_DATE | DATE | NO | The date of expiration of the account. |
| DEFAULT_TABLESPACE | VARCHAR2(30) | NO | The default tablespace for data. |
| TEMPORARY_TABLESPACE | VARCHAR2(30) | NO | The name of the default tablespace for temporary tables or the name of a tablespace group. |
| LOCAL_TEMP_TABLESPACE | VARCHAR2(30) | NO | The local temporary tablespace. |
| CREATED | DATE | NO | The date when the user was created. |
| INITIAL_RSRC_CONSUMER_GROUP | VARCHAR2(30) | NO | The initial resource consumer group for the user. |
| EXTERNAL_NAME | VARCHAR2(4000) | NO | The external username of the user. |
| PROXY_ONLY_CONNECT | VARCHAR2(1) | NO | Indicates whether the user can connect to the database only as a proxy user. |
| COMMON | VARCHAR2(3) | NO | Indicates whether the user is a common user. |
| ORACLE_MAINTAINED | VARCHAR2(1) | NO | Indicates whether the user was created and maintained by using a script provided by OceanBase Database in Oracle mode. |
| INHERITED | VARCHAR2(3) | NO | Indicates whether the user is inherited from other containers. |
| DEFAULT_COLLATION | VARCHAR2(100) | NO | The default character set. |
| IMPLICIT | VARCHAR2(3) | NO | Indicates whether the user was created by an implicit application. |
| ALL_SHARD | VARCHAR2(3) | NO | Indicates whether the user was created with sharding enabled. |
| PASSWORD_CHANGE_DATE | DATE | YES | The time when the password was last changed. |
Sample query
obclient [SYS]> SELECT * FROM SYS.USER_USERS\G
The query result is as follows:
*************************** 1. row ***************************
USERNAME: SYS
USERID: 200003
ACCOUNT_STATUS: OPEN
LOCK_DATE: NULL
EXPIRY_DATE: NULL
DEFAULT_TABLESPACE: NULL
TEMPORARY_TABLESPACE: NULL
LOCAL_TEMP_TABLESPACE: NULL
CREATED: 29-NOV-23
INITIAL_RSRC_CONSUMER_GROUP: NULL
EXTERNAL_NAME: NULL
PROXY_ONLY_CONNECT: N
COMMON: NO
ORACLE_MAINTAINED: N
INHERITED: NO
DEFAULT_COLLATION: USING_NLS_COMP
IMPLICIT: NO
ALL_SHARD: NO
PASSWORD_CHANGE_DATE: 29-NOV-23
1 row in set (0.001 sec)