Note
This view is available starting with V4.2.1 BP2.
Purpose
This view displays the information of the current user.
Applicability
This view applies only to OceanBase Database Enterprise Edition.
Columns
Column |
Type |
Nullable |
Description |
|---|---|---|---|
| USERNAME | VARCHAR2(128) | NO | The username. |
| USERID | NUMBER(38) | NO | The user ID. |
| ACCOUNT_STATUS | VARCHAR2(32) | NO | The account status. Valid values:
|
| LOCK_DATE | DATE | NO | The date when the account was locked. This column is valid only if the account status is LOCKED(TIMED) or LOCKED. |
| EXPIRY_DATE | DATE | NO | The account expiration date. |
| DEFAULT_TABLESPACE | VARCHAR2(30) | NO | The default tablespace for data. |
| TEMPORARY_TABLESPACE | VARCHAR2(30) | NO | The default temporary tablespace or temporary 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 of the user. |
| EXTERNAL_NAME | VARCHAR2(4000) | NO | The external name of the user. |
| PROXY_ONLY_CONNECT | VARCHAR2(1) | NO | Indicates whether the user can only connect through a proxy user. |
| COMMON | VARCHAR2(3) | NO | Indicates whether the user is a common user. |
| ORACLE_MAINTAINED | VARCHAR2(1) | NO | Indicates whether the user is created and maintained by a script in Oracle mode. |
| INHERITED | VARCHAR2(3) | NO | Indicates whether the user is inherited from another container. |
| DEFAULT_COLLATION | VARCHAR2(100) | NO | The default character set. |
| IMPLICIT | VARCHAR2(3) | NO | Indicates whether the user is created by an implicit application. |
| ALL_SHARD | VARCHAR2(3) | NO | Indicates whether the user is created in shard mode. |
| PASSWORD_CHANGE_DATE | DATE | YES | The last date when the password was changed. |
Sample query
Query the detailed information of the current user.
obclient> 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)
References
- Query all users visible to the current user: ALL_USERS
- Query all users in the current tenant: DBA_USERS
- For more information about users and privileges, see Overview of users and privileges.
