Bo's Oracle Station

查看: 2160|回复: 0

课程第45次(2018-05-16星期三)

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2018-5-16 19:56:20 | 显示全部楼层 |阅读模式

  1.    select  c.CON_ID,c.FILE_NAME,c.TABLESPACE_NAME,c.STATUS
  2.    from cdb_temp_files c;
  3.   
  4.    select t.CON_ID,t.NAME,d.NAME,d.STATUS
  5.   from v$tablespace t, v$tempfile d
  6.   where t.TS#=d.TS#  and t.CON_ID=d.CON_ID
  7.   order by 1,2;
  8.   
  9.    select c.COMMON,c.CON_ID,c.DEFAULT_TABLESPACE,
  10.   c.TEMPORARY_TABLESPACE,c.INITIAL_RSRC_CONSUMER_GROUP,c.USERNAME
  11.    from cdb_users c
  12.    where c.USERNAME='SYSTEM';
  13.    
  14.    
  15.    select c.COMMON,c.CON_ID,c.DEFAULT_TABLESPACE,
  16.   c.TEMPORARY_TABLESPACE,c.INITIAL_RSRC_CONSUMER_GROUP,c.USERNAME
  17.    from cdb_users c
  18.    where c.COMMON='NO';
  19.    
  20.    ---
  21.       select con_id, username from cdb_users
  22.   where common ='YES'
  23.   ORDER BY 2;
  24.   
  25.   -------

  26.   select r.ROLE,r.CON_ID
  27.   from cdb_roles r
  28.   where r.COMMON='NO';
  29.     ----------------
  30.   select  *
  31.   from cdb_roles r
  32.   order by r.CON_ID,    r.ROLE;
  33. --------------------------------

  34. select  count(*)  from system_privilege_map;

  35. select  distinct p.name  from system_privilege_map p
  36. order by 1;

  37. ---------------------------
  38. select  * from cdb_sys_privs  sp
  39. where  sp.COMMON='YES';

  40. ---------------------
  41.     select  * from cdb_sys_privs  sp
  42. where sp.COMMON='NO';

  43. -----------------------------

  44.   select tp.GRANTEE,tp.GRANTOR,tp.CON_ID,tp.TABLE_NAME
  45. from cdb_tab_privs tp
  46. where  tp.COMMON='YES'  and tp.CON_ID=3;
  47. ---------------------------

  48. select tp.GRANTEE,tp.GRANTOR,tp.CON_ID,tp.TABLE_NAME
  49. from cdb_tab_privs tp
  50. where tp.CON_ID=1  and  tp.COMMON='NO';


  51.   
  52.   
复制代码

关于多租户数据库的结论:

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子句的授权和撤销都是本地的。





Screenshot.png
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-4-20 06:23 , Processed in 0.032547 second(s), 27 queries .

快速回复 返回顶部 返回列表