Oracle 视图 ALL_USERS 官方解释,作用,如何使用详细说明

本站中文解释

Oracle视图ALL_USERS是Oracle系统表的一部分,它可以用来查出被授权的所有Oracle用户的角色,账户名等信息。可以通过该功能来获取全部数据库用户的信息,以便更好的管理和控制数据库中的账户和角色信息。

使用ALL_USERS视图可以使用以下语法查询:

SELECT *
FROM ALL_USERS;

即可获得所有分配给数据库用户的信息,例如用户名,位置,用户创建日期,用户角色等等。

官方英文解释

ALL_USERS lists all users of the database visible to the current user.

This view does not describe the users (see the related views).

Related Views

  • DBA_USERS describes all users of the database, and contains more columns than ALL_USERS.

  • USER_USERS describes the current user, and contains more columns than ALL_USERS.

Column Datatype NULL Description

USERNAME

VARCHAR2(128)

NOT NULL

Name of the user

USER_ID

NUMBER

NOT NULL

ID number of the user

CREATED

DATE

NOT NULL

User creation date

COMMON

VARCHAR2(3)

Indicates whether a given user is common. Possible values:

  • YES if a user is common

  • NO if a user is local (not common)

ORACLE_MAINTAINED

VARCHAR2(1)

Denotes whether the user was created, and is maintained, by Oracle-supplied scripts (such as catalog.sql or catproc.sql). A user for which this column has the value Y must not be changed in any way except by running an Oracle-supplied script.

INHERITED

VARCHAR2(3)

Indicates whether the user definition was inherited from another container (YES) or not (NO)

DEFAULT_COLLATION

VARCHAR2(100)

Default collation for the user’s schema

IMPLICIT

VARCHAR2(3)

Indicates whether this user is a common user created by an implicit application (YES) or not (NO)

ALL_SHARD

VARCHAR2(3)

In a sharded database, the value in this column indicates whether the user was created with shard DDL enabled. The possible values are:

  • YES: The user was created with shard DDL enabled. The user exists on all shards and the shard catalog.

  • NO: The user was created without shard DDL enabled. The user exists only in the database in which the user was created.

In a non-sharded database, the value in this column is always NO.

EXTERNAL_SHARDFoot 1

VARCHAR2(3)

 

In a federated sharded database, the value in this column indicates whether the user is an external shard user (YES) or not (NO).

In other types of databases, the value in this column is always NO.

Footnote 1 This column is available starting with Oracle Database 21c.

See Also:

  • “DBA_USERS”

  • “USER_USERS”

  • Using
    Oracle Sharding
    for more information about sharded database management


数据运维技术 » Oracle 视图 ALL_USERS 官方解释,作用,如何使用详细说明