Bo's Oracle Station

查看: 2443|回复: 0

(052-25)第43次:2016-01-06星期三

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2016-1-7 08:55:47 | 显示全部楼层 |阅读模式
本帖最后由 botang 于 2016-1-11 15:07 编辑

(052-25)上完1Z0-052第8章


  1. select   *  from dba_users u where u.username='U5';

  2. select sysdate+180 from dual;

  3. alter user u5 account lock;



  4. alter user u5 account unlock;

  5. select   *  from dba_users u where u.username='OE';

  6. alter user u5 account lock password expire ;
  7. ----

  8. select * from dba_tab_privs tp where tp.grantee='U5';

  9. select  * from dba_col_privs cp where cp.grantee='U5';

  10. create directory dir1 as '/home/oracle/dir1';

  11. select * from dba_directories;

  12. grant   read,write,execute on directory dir1 to u5 ;
  13. --
  14. grant connect to u6 identified by oracle_4U ;

  15. ---

  16. select * from dba_ts_quotas;

  17. ---

  18. alter user u5 quota 1M  on users;

  19. alter user u6 quota 1M on users;

  20. ----

  21. select * from dba_sys_privs sp where sp.grantee in ('U5','U6') ;


  22. ---
  23. select * from dba_tab_privs sp where sp.grantee in ('U5','U6') ;


  24. ---

  25. create role role2 ;

  26. grant execute on hr.func1  to role2 ;

  27. select * from role_sys_privs  where role='ROLE2';

  28. select  * from role_tab_privs  where role='ROLE2' ;

  29. select * from role_role_privs where role='ROLE2';


  30. ----

  31. create role role3 ;



  32. grant execute on hr.func2 to role3 ;

  33. grant role3 to role2;

  34. ----

  35. select  * from dba_roles r where r.role in ('ROLE2','ROLE3','ROLE4');

  36. create role role4  identified by oracle_4U;

  37. grant create table to role4;

  38. grant role4 to u5;

  39. --

  40. select * from  dba_role_privs rp where rp.grantee='U6';

  41. alter user u6 default role connect ;

  42. alter user u6 default role none ;
  43. --
  44. select * from dba_profiles;


  45. create profile profile1 limit
  46. FAILED_LOGIN_ATTEMPTS 1;

  47. alter user hr profile profile1;


  48. select * from dba_users u where u.username='HR';

  49. alter user hr account unlock;


  50. ALTER PROFILE "PROFILE1" LIMIT PASSWORD_LOCK_TIME 0.000694444;

  51. ---

  52. ALTER PROFILE "PROFILE1" LIMIT PASSWORD_LOCK_TIME unlimited
  53. FAILED_LOGIN_ATTEMPTS DEFAULT;



  54. ALTER PROFILE "PROFILE1" LIMIT PASSWORD_LIFE_TIME 0.000694444
  55. PASSWORD_GRACE_TIME 0.000694444;


  56. ----

  57. ALTER PROFILE "PROFILE1" LIMIT
  58. PASSWORD_REUSE_TIME  1;


  59. ----

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

  61. select * from dba_users u where u.username='HR';
复制代码


回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-12-4 16:32 , Processed in 0.038154 second(s), 24 queries .

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