百度空间 | 百度首页 
               
 
查看文章
 
传智播客_ORACLE经典视频教程 学习记录
2008年07月20日 星期日 16:24

传智播客_ORACLE经典视频教程 学习记录


sqlplus lanjh/lanjh

disconn lanjh;

conn lanjh;


3个默认的用户

sys
system
scott
系统权限

grant create session to lanjh;
grant create table to lanjh;
grant unlimited tablespace to lanjh;

revoke create session from lanjh;
revoke create table from lanjh;
revoke unlimited tablespace from lanjh;

grant create session to public;
select * from user_sys_privs;

对象权限

grant select on mytab to lanjh;
grant all on mytab to lanjh;

revoke select on mytab from lanjh;
revoke all on mytab from lanjh;

select * from user_tab_privs;

对象权限可以控制到列

grant update (name) on mytab to lanjh;
grant insert (id) on mytab to lanjh;

select * from user_col_privs;
注意:查询和删除不能控制到列。


ddl数据定义语言   dml数据操纵语言 dcl数据控制语言

权限的传递

grant alter any table to lanjh with admin option;
grant select on A to lanjh with grant option;

角色

create role myrole;
grant create session to myrole;
drop role myrole;

注意 有些系统权限无法直接赋予角色的

create table create any table
[alter table] alter any table
[drop table] drop any table
表是属于某一个用户的。
角色不属于某个


类别:数据库 | 添加到搜藏 | 浏览() | 评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码: 请点击后输入四位验证码,字母不区分大小写
      

     

©2009 Baidu