Bo's Oracle Station

查看: 2159|回复: 0

多组户体系架构里的表空间管理,多组户体系架构里的安全性维护和备份恢复及统一审计和导入和导出,课程第70/71次(2017-03-25星期六晚上和2017-03-

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2017-3-27 14:57:02 | 显示全部楼层 |阅读模式
本帖最后由 botang 于 2017-3-27 15:02 编辑

上完1Z0-063第5章(多组户体系架构里的表空间管理)
上完1Z0-063第6章(多组户体系架构里的安全性维护)

上完1Z0-063第7章(备份恢复,尤其是PDB/TS的PITR中的AUXILIARY语法和原理,闪回容器数据库)
上完1Z0-063第8章(CDB资源计划和ADDM)
上完1Z0-063第9章(统一审计和导入和导出)

1Z0-052共19章(上完19章),1Z0-053共21章(上完21章),1Z0-063多租户部分共9章(上完9章)
总共上完全部49章中的49章
  1. select  username  , default_tablespace, temporary_tablespace ,con_id
  2. from cdb_users where username='LU' order by con_id;

  3. select    t.TABLESPACE_NAME, t.CONTENTS,     t.CON_ID
  4.   from cdb_tablespaces t
  5.   order by t.con_id;
  6.   
  7.   select d.name , t.name , t.con_id
  8.     from v$datafile d , v$tablespace t
  9.         where d.con_id=t.con_id
  10.         and  d.ts#=t.ts#
  11.         and  t.name like 'UNDO%';
  12.         
  13.         ----
  14.         select USERNAME, COMMON, CON_ID from cdb_users
  15.          order by 3;
  16.          --
  17.          select  username , con_id from cdb_users
  18.           where common='NO'
  19.           order by con_id;
  20.           ---
  21.          
  22.           create user c##_USER identified by x container=all;
  23.          
  24.           select USERNAME, COMMON, CON_ID from cdb_users
  25.            where username='C##_USER'
  26.          order by 3;
  27.          ---
  28.          grant create session to c##_user   container=all ;
  29.          
  30.          
  31.          ---
  32.          
  33.          select   *
  34.            from cdb_sys_privs sp
  35.             where sp.GRANTEE='C##_USER';
  36.                
  37.                 ---
  38.                
  39.                 create user local_user identified by x
  40.                  container=current;
  41.                  
  42.                  ---
  43.                  create user C##_USER2 identified by x;
  44.                  
  45.                    select USERNAME, COMMON, CON_ID from cdb_users
  46.            where username='C##_USER2'
  47.          order by 3;
  48.          
  49.          ---
  50.          
  51.          grant create session to c##_user2 ;

  52.           select   *
  53.            from cdb_sys_privs sp
  54.             where sp.GRANTEE='C##_USER2';
  55.                
  56.                 drop user c##_user2;
  57.                  
  58. ----
  59. select USERNAME, COMMON, CON_ID from cdb_users
  60.            where con_id=3
  61.          order by 1;
  62. ----        

  63.   select   *
  64.            from cdb_sys_privs sp
  65.             where sp.GRANTEE='LOCAL_USER_PDB2';
  66.                
  67.                 ---
  68.                         select role, COMMON, CON_ID from cdb_roles
  69.          order by 3,1;
  70.          
  71.          create role c##_role ;
  72.          
  73.          ---
  74.         select role, COMMON, CON_ID from cdb_roles where common='NO';
  75.         
  76.          select  *
  77.            from cdb_role_privs rp
  78.             where rp.GRANTED_ROLE='C##_ROLE';
  79.                
  80.                 grant c##_role to c##_user;
  81.                
  82.         grant c##_role to c##_user  container=all;
  83.         
  84.          select  *
  85.            from cdb_role_privs rp
  86.             where rp.GRANTED_ROLE='C##_ROLE';
  87.                
  88.                 ---
  89.                 revoke c##_role from c##_user container=all;
  90.                
  91.                 revoke c##_role from c##_user container=current ;
  92. ---

  93. select  *
  94.            from cdb_role_privs rp
  95.             where rp.GRANTED_ROLE='LOCAL_ROLE_PDB2';
  96.                
  97.         ----
  98.         select   *
  99.            from cdb_sys_privs sp
  100.             where sp.GRANTEE  in ('C##_USER','LOCAL_USER_PDB2');
  101.                
  102.                 ---
  103.                 grant CREATE TABLE, UNLIMITED TABLESPACE to C##_USER
  104. CONTAINER=ALL;

  105. grant CREATE SEQUENCE to C##_USER CONTAINER=CURRENT;

  106. select   *
  107.            from cdb_sys_privs sp
  108.             where sp.GRANTEE  in ('C##_USER','LOCAL_USER_PDB2')
  109.                  and  sp.PRIVILEGE='CREATE SEQUENCE';
  110.                
  111.         select   *
  112.            from cdb_sys_privs sp
  113.             where sp.GRANTEE  in ('C##_USER','LOCAL_USER_PDB2')
  114.                  and  sp.PRIVILEGE='CREATE SYNONYM';
  115.         
  116.                 select  * from cdb_CONTAINER_DATA
  117. order by con_id,1;

  118. CREATE USER c##jfv IDENTIFIED BY oracle_4U;

  119. GRANT CREATE SESSION, SET CONTAINER TO c##jfv
  120. CONTAINER=ALL;

  121. GRANT SELECT ON sys.v_$session TO c##jfv CONTAINER=ALL;

  122. SELECT username, con_id FROM v_$session
  123. WHERE username IS NOT NULL AND username <> 'DBSNMP';

  124. alter user c##jfv
  125. set  container_data=(cdb$root, pdb1_1, pdb2_2)  for v_$session
  126.   container=current;

  127. select  * from cdb_CONTAINER_DATA
  128. order by con_id,1;

复制代码



回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-4-25 23:25 , Processed in 0.035062 second(s), 24 queries .

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