oracle安全有关的对象

来源:互联网 发布:cf英雄武器抽奖 软件 编辑:程序博客网 时间:2024/06/06 01:35
主要内容来源于<<oracle从入门到精通(视频实战版)>>
用户登录数据库的三种方式:a.一般的密码验证方式;b.外部验证方式,通常验证的密码与数据库所有的操作系统密码一致;c.全局验证方式,此种方式也不是把密码存放在oracle数据库中的.最常用的就是密码验证方式.


SQL语法详见http://docs.oracle.com/cd/E11882_01/server.112/e41084.pdf


一.用户管理
SQL> CREATE USER user_name IDENTIFIED BY password;
SQL> ALTER USER user_name ACCOUNT UNLOCK;
SQL> ALTER USER user_name IDENTIFIED BY password;
SQL> DROP USER user_name cascade;


二.权限管理
查看系统都具备哪些权限
SQL> select PRIVILEGE from dba_sys_privs;
查看当前会话都具备哪些权限
SQL> select * from session_privs;


授权的级联grant选项
with admin option 权限回收无级联 适用系统权限和角色
with grant option 权限回收有级联 适用对象权限
SQL> grant connect,resource,select any table to u1;

SQL> revoke connect from u1;


三.角色管理(详细参考上面的pdf)
create role...
alter role...
drop role...
grant role to user


四.概要文件profile
profile主要存放数据库中的系统资源或数据库使用限制的一些内容.比如对用户进行口令的管理,cpu,内存等资源的分配
SQL>select distinct profile from dba_profiles;
create profile...
alter profile...
drop profile...


0 0
原创粉丝点击