|
- select c.CON_ID,c.FILE_NAME,c.TABLESPACE_NAME,c.STATUS
- from cdb_temp_files c;
-
- select t.CON_ID,t.NAME,d.NAME,d.STATUS
- from v$tablespace t, v$tempfile d
- where t.TS#=d.TS# and t.CON_ID=d.CON_ID
- order by 1,2;
-
- select c.COMMON,c.CON_ID,c.DEFAULT_TABLESPACE,
- c.TEMPORARY_TABLESPACE,c.INITIAL_RSRC_CONSUMER_GROUP,c.USERNAME
- from cdb_users c
- where c.USERNAME='SYSTEM';
-
-
- select c.COMMON,c.CON_ID,c.DEFAULT_TABLESPACE,
- c.TEMPORARY_TABLESPACE,c.INITIAL_RSRC_CONSUMER_GROUP,c.USERNAME
- from cdb_users c
- where c.COMMON='NO';
-
- ---
- select con_id, username from cdb_users
- where common ='YES'
- ORDER BY 2;
-
- -------
-
- select r.ROLE,r.CON_ID
- from cdb_roles r
- where r.COMMON='NO';
- ----------------
- select *
- from cdb_roles r
- order by r.CON_ID, r.ROLE;
- --------------------------------
-
- select count(*) from system_privilege_map;
- select distinct p.name from system_privilege_map p
- order by 1;
-
- ---------------------------
- select * from cdb_sys_privs sp
- where sp.COMMON='YES';
-
- ---------------------
- select * from cdb_sys_privs sp
- where sp.COMMON='NO';
-
- -----------------------------
-
- select tp.GRANTEE,tp.GRANTOR,tp.CON_ID,tp.TABLE_NAME
- from cdb_tab_privs tp
- where tp.COMMON='YES' and tp.CON_ID=3;
- ---------------------------
-
- select tp.GRANTEE,tp.GRANTOR,tp.CON_ID,tp.TABLE_NAME
- from cdb_tab_privs tp
- where tp.CON_ID=1 and tp.COMMON='NO';
-
-
-
-
复制代码
关于多租户数据库的结论:
1. 在根容器上不存在本地用户(Notice that there is no local user in the root container because it is impossible to create any local user in the root)。
2. 在根容器上不存在本地角色(Notice that there is no local role in the root container because it is impossible to create any local role in the root)。
3. 系统权限和对象权限本身都没有分本地或公共,但是进行授权时,这个动词(授权)分本地授权和公共授权(对象权限在根容器上有本地授权,公共授权的都是一样的)。在根容器上有对象权限的本地授权(这是根容器上唯一“本地”有关系的东西)。
4. 角色本身有分本地或公共之分,进行授权时,这个动词(授权)还分本地授权和公共授权。主要就是公共角色的本地授权和公共授权。本地角色只能本地授权。(公共角色和权限在插件数据库里是可以做公共用户的本地授权)
5. 不写container子句的授权和撤销都是本地的。
|
-
|