Bo's Oracle Station

查看: 2724|回复: 0

第44和45次:2015-08-22星期六上下午

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2015-8-22 23:06:07 | 显示全部楼层 |阅读模式
本帖最后由 botang 于 2015-8-22 23:15 编辑

上完1Z0-052第8章        (52-37)
上完1Z0-052第9章        (52-38)
上完1Z0-052第10章        (52-39)

2015-08-22a.sql:
  1. select  distinct  sp.privilege  from
  2.   dba_sys_privs sp ;
  3.   
  4.   
  5.   
  6.   
  7.   select  *
  8.      from dba_sys_privs sp where sp.grantee='U1';

  9. select      *
  10.      from dba_tab_privs tp where tp.grantee='U1';
  11.   
  12. select  *
  13.   from dba_col_privs cp where cp.grantee='U1';

  14. select     *
  15.      from dba_role_privs rp where rp.grantee='U1';
  16.      
  17.      
  18.      
  19.      revoke select  on hr.employees from u1;
  20.      
  21.    select  *
  22.      from dba_sys_privs sp where sp.grantee='U2';   
  23.      
  24.      
  25.   select      *
  26.      from dba_tab_privs tp where tp.grantee='U2';
  27.   
  28. select  *
  29.   from dba_col_privs cp where cp.grantee='U2';

  30. select     *
  31.      from dba_role_privs rp where rp.grantee='U2';   
  32.      
  33.   grant select any table to u1  with admin option;
  34.   
  35.   revoke select any table from u1;
  36.   
  37.   revoke select any table from u2;
  38.   
  39.   grant select  on hr.employees to u1 with grant option;
  40.   
  41.   revoke select  on hr.employees  from u1;
  42.   
  43.   select  * from dba_roles order by 1 ;
  44.   
  45.   create role r1 ;
  46.   
  47.   select  * from role_role_privs rrp where rrp.role='R1';
  48.   
  49.   select  * from role_tab_privs rtp where rtp.role='R1';
  50.   
  51.   select  * from role_sys_privs rsp where rsp.role='R1';
  52.   
  53.   grant select  on hr.employees to r1;
  54.   
  55.   grant r1 to u1 with admin option;
  56.   
  57.   revoke r1 from u1;
  58.   
  59.   revoke select  on hr.employees from r1;
  60.   
  61.    revoke r1 from u2;
  62.    
  63.    drop role r1;
  64.   
  65.     create role r1  identified by oracle_4U ;
  66.    
  67.     grant select  on hr.employees to r1;
  68.    
  69.     grant r1 to u1 ;
  70.   
  71.   alter role r1 identified by redhat_4U;
  72.   
  73.   alter system kill session '201,35' immediate;
  74.   
  75.   select * from v$session where username='U1';
  76.   
  77.   select     *
  78.      from dba_role_privs rp where rp.grantee='U1';   
  79.   
  80.   create role r2 ;
  81.   
  82.   grant  create any index to r2;
  83.   
  84.    grant r2 to u1;
  85.   
  86.   alter user u1 default role none;
  87.   
  88.   alter user u1 default role connect,r1;
  89.   
  90.   grant r2 to r1;
  91.   
  92.   ----
  93.   
  94.      select  *
  95.      from dba_sys_privs sp where sp.grantee='U3';   
  96.      
  97.      
  98.   select      *
  99.      from dba_tab_privs tp where tp.grantee='U3';
  100.   
  101. select  *
  102.   from dba_col_privs cp where cp.grantee='U3';

  103. select     *
  104.      from dba_role_privs rp where rp.grantee='U3';   
  105.   

  106. create role r3 ;

  107. grant select  on hr.employees to r3;

  108. grant r3 to u3;

  109. grant create procedure to u3;

  110. revoke r3 from u3;

  111. grant select  on hr.employees to u3;
复制代码

2015-08-22b.sql:

  1. CREATE PROFILE "PROFILE1" LIMIT
  2. FAILED_LOGIN_ATTEMPTS 1;

  3. select  * from dba_profiles p where p.profile='PROFILE1' and p.resource_type='PASSWORD';

  4. select  * from dba_users  where username='HR';

  5. alter user hr profile profile1;

  6. alter user hr account unlock;

  7. ALTER PROFILE "PROFILE1" LIMIT PASSWORD_LOCK_TIME 0.000694444;

  8. ALTER PROFILE "PROFILE1" LIMIT  PASSWORD_REUSE_MAX 1
  9. PASSWORD_REUSE_TIME 0.000694444;

  10. ALTER PROFILE "PROFILE1" LIMIT  PASSWORD_verify_function  verify_function_11g;
复制代码

2015-08-22c.sql:
  1. select  * from dba_tablespaces;

  2. create temporary  tablespace temp2 tempfile '/u01/app/oracle/oradata/orcl/temp2.dbf'
  3. size 15G;

  4. select  * from database_properties;

  5. alter database default temporary tablespace temp2;


  6. create undo tablespace undotbs1   datafile size 100M  autoextend on maxsize 20G;

  7. drop tablespace undotbs1;

  8. select  * from dba_rollback_segs;

  9. select  * from v$transaction ;

  10. select  * from v$session where taddr='00000001EAEBE200';

  11. alter system kill session '8,3111' immediate;


  12. select  * from dba_tablespaces;


  13. alter tablespace undotbs1 retention guarantee;


  14. select  * from dict where table_name like '%UNDO%'  or  table_name like '%ROLLBACK%';


  15. select  * from DBA_HIST_UNDOSTAT;


  16. select  * from v$undostat;
复制代码



回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-11-1 08:06 , Processed in 0.043337 second(s), 24 queries .

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