- Oracle Database 12c Security Cookbook
- Zoran Pavlovi? Maja Veselica
- 471字
- 2021-07-02 16:43:15
Creating a common user
A common user is a user created in the root container, which has the same identity across all containers. The main purpose of a common user is to perform "infrastructure" administrative tasks, such as starting up a CDB, plugging and unplugging PDBs, and opening PDBs. There are two types of common users: Oracle-supplied (for example, SYS
and SYSTEM
) and user-created common users.
Getting ready
To complete this recipe, you'll need an existing common user who has create user
privilege granted commonly.
How to do it...
- Connect to the root container as a common user who has
create user
privilege granted commonly (for example,c##zoran
or system user):SQL> connect c##zoran@cdb1
- Create a common user (for example,
c##maja
):c##zoran@CDB1> create user c##maja identified by oracle1 container=all;
How it works...
c##maja
is actually not a single user, but each container has a user named c##maja
and the passwords must be the same.

Figure 4
There are a few rules you should be aware of:
- The name of a common user must be unique across all containers. In version 12.1.0.1, it must begin with
c##
orC##
unless you change the internal parametercommon_user_prefix
(which you shouldn't do on a production system without approval from Oracle Support) and, in version 12.1.0.2, it is best practice to use a prefix (default valuec##
orC##
). However, you can choose it by changing the value of thecommon_user_prefix
parameter (this naming convention doesn't apply to Oracle-supplied users in either version). - A common user can have different privileges in different containers.
- The schemas for a common user may contain different objects in different containers.
The column oracle_maintained
(in DBA_USERS
) provides information as to whether a user is created and maintained by Oracle-supplied scripts:
c##zoran@CDB1> select username, oracle_maintained from dba_users where username='SYSTEM' or username='C##ZORAN';
USERNAME O --------------- - SYSTEM Y C##ZORAN N
There's more...
You can also create common users by using Oracle Enterprise Manager Cloud Control (OEM) 12c.
- Start OEM 12c and log in using user
SYSMAN
orSYSTEM
. - From the Databases page, select the root database in which you want to create a common user. The database home page appears.
- From the Administration menu, select Security (a drop-down menu) and then Users (see Figure 5):
Figure 5
- If prompted, log in to the root as a common user who has a
create user
privilege (for example,c##zoran
; see Figure 6):Figure 6
- Click on the Create button (see Figure 7):
Figure 7
- To create a common user, it is enough to fill out the following fields on the General tab: Name (for example,
c##john
), Enter Password, and Confirm Password (see Figure 8) and then click on the OK button:Figure 8
- UI設計基礎培訓教程
- JavaFX Essentials
- DevOps入門與實踐
- INSTANT Sencha Touch
- TypeScript圖形渲染實戰:基于WebGL的3D架構與實現
- Windows Forensics Cookbook
- Express Web Application Development
- 編程與類型系統
- Advanced Express Web Application Development
- Solutions Architect's Handbook
- 算法圖解
- Microsoft Exchange Server 2016 PowerShell Cookbook(Fourth Edition)
- Python數據科學實踐指南
- 跟小樓老師學用Axure RP 9:玩轉產品原型設計
- Ionic Framework By Example