赞
踩
ORACLE 19命令
版本:Version 19.3.0.0.0
[root@oracledb ~]# su - oracle
Last login: Tue Jun 1 01:48:10 PDT 2021 on pts/5
[oracle@oracledb ~]$ sqlplus "/as sysdba"
SQL>select con_id,dbid,NAME,OPEN_MODE from v$pdbs;
SQL> alter pluggable database pdb open;
SQL> alter session set container=pdb;
SQL>select sys_context ('USERENV', 'CON_NAME') from dual;
SQL>create user hmf identified by xxx;
SQL>grant dba to hmf;
Multitenant Environment:多租户环境
CDB(Container Database):数据库容器
PD(Pluggable Database):可插拔数据库
CDB与PDB关系图
COMMON USERS(普通用户):经常建立在CDB层,用户名以C##或c##开头;
LOCAL USERS(本地用户):仅建立在PDB层,建立的时候得指定CONTAINER。
在oracle 12c中,使用了一个container(容器)的概念,让我们先看看官方的对它的介绍,为了保留最原始的意思,这里引用英文而不翻译了。
The data dictionary in each container in a CDB is separate, and the current container is the container whose data dictionary is used for name resolution and for privilege authorization. The current container can be the root or a PDB. Each session has exactly one current container at any point in time, but it is possible for a session to switch from one container to another.
Each container has a unique ID and name in a CDB. You can use the CON_ID and CON_NAME parameters in the USERENV namespace to determine the current container ID and name with the SYS_CONTEXT function.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。