Oracle 参数 COMMON_USER_PREFIX 官方解释,作用,如何配置最优化建议

本站中文解释

COMMON_USER_PREFIX选项是Oracle连接时,系统使用的前缀,前缀在USER表中作为查询凭据。COMMON_USER_PREFIX参数一般在oracle数据库默认是C##。

正确设置:

首先打开系统名称“SQL*Plus”,输入sys用户名和密码,连接进oracle数据库;

然后运行以下脚本:

ALTER system set common_user_prefix=prefix_name scope=spfile;

前面的 prefix_name 替换成你想要的前缀名称,之后保存脚本;

最后,执行以下指令,以生效新的设定:

SHUTDOWN IMMEDIATE

STARTUP

以上就是正确设置Oracle参数COMMON_USER_PREFIX的过程。

官方英文解释

COMMON_USER_PREFIX specifies a prefix that the names of common users, roles, and profiles in a multitenant container database (CDB) must start with.

Property Description

Parameter type

String

Syntax

COMMON_USER_PREFIX = prefix

Default value

In a CDB root, C## is the default value. In an application root, the empty string is the default value.

Modifiable

No

Modifiable in a PDB

Yes

Basic

No

Oracle RAC

Multiple instances must have the same value

Names of local users, roles, and profiles must not start with the same prefix. A case-insensitive comparison of the prefixes for user, role, and profile names to the value of this parameter is done.

When a value is set for COMMON_USER_PREFIX, Oracle will require that the names of common users, roles, and profiles start with the string assigned to this parameter.

The names of users, roles, and profiles created using this prefix must be valid names.

Regardless of the value of the COMMON_USER_PREFIX parameter, the names of local users, roles, and profiles cannot start with C##. Similarly, the names of application common users and local users in an application PDB cannot start with C##.

Caution:

You can change the value of the COMMON_USER_PREFIX parameter, but do so only with great care.

If COMMON_USER_PREFIX is set to an empty string, Oracle will not enforce any restrictions on the names of common or local users, roles, and profiles.

Setting this parameter to an empty string will result in no restrictions being placed on names of common and local users, roles, and profiles, which could lead to conflicts between the names of local and common users, roles, and profiles when a PDB is plugged into a different CDB, or when opening a PDB that was closed when a common user was created.

Note:

COMMON_USER_PREFIX can be set in the context of an application container.

If you set COMMON_USER_PREFIX in the application root to a non-null value, then the application common user should start with that prefix, and a local user created in an application PDB cannot start with that prefix.

By default, COMMON_USER_PREFIX is the empty string in an application root.

Note:

When you query the V$PARAMETER or V$SYSTEM_PARAMETER view, a value of NONE is returned for the DEFAULT_VALUE column for the COMMON_USER_PREFIX parameter.

However, the database enforces a default value of C## for a CDB root and a default value of the empty string for an application root.

See Also:

  • Oracle Database SQL
    Language Reference
    for information about valid user names

  • Oracle Database SQL
    Language Reference
    for information about valid role names

  • Oracle Database SQL
    Language Reference
    for information about valid profile names

  • Oracle Multitenant
    Administrator’s Guide
    for more information about the multitenant architecture


数据运维技术 » Oracle 参数 COMMON_USER_PREFIX 官方解释,作用,如何配置最优化建议