Chinaunix首页 | 论坛 | 博客
  • 博客访问: 379911
  • 博文数量: 120
  • 博客积分: 5051
  • 博客等级: 大校
  • 技术积分: 1255
  • 用 户 组: 普通用户
  • 注册时间: 2007-07-03 01:25
文章分类

全部博文(120)

文章存档

2011年(2)

2010年(11)

2009年(28)

2008年(26)

2007年(53)

我的朋友

分类: Oracle

2008-08-31 15:59:26

1)创建用户

***你必须拥有create user的权限才可以创建用户***
***新创建必须授予create session的系统权限才可以连接数据库***
 
Syntax:

Description of create_user.gif follows
 
2)修改用户
 
***alter user 系统权限是必须的***
 
 
 
Description of alter_user.gif follows
 
3)删除用户
 
***drop user系统权限是必须的***
 
简单删除用户 drop user user_name;
如果有用户schema存在,你需要用  drop user username cascade;
如果用户有schema存在,而你不想删除schema,只是不想让这个用户连接数据库 revoke crate session from user_name ;
 
 
**************** 用色(role)的管理与用户的管理大至相同 *********************
 
4)创建角色:
***create role system privilege is needed ***
Description of create_role.gif follows
 
5)修改角色:
***alter any role system privilege is needed ***
Description of alter_role.gif follows
6)删除角色:
***drop any role system privilege is needed ***
 
Description of drop_role.gif follows
 
7)Set role
用set role可以能启用或关闭角色。
Description of set_role.gif follows

 

8)用户与角色的授权
授予系统权限 grant any privilege is needed
授予角色权限 grant any role is needed
授予对象权限 grant any object privilege is needed
 
语法:
grant::=
Description of grant.gif follows
::=
Description of grant_system_privileges.gif follows
 
::=
Description of grant_object_privileges.gif follows
 
::=
Description of on_object_clause.gif follows
 
::=
Description of grantee_clause.gif follows
 
ALL Privilege list:
 
8)取消授权:
 
revoke::=
Description of revoke.gif follows


::=
Description of revoke_system_privileges.gif follows


::=
Description of revoke_object_privileges.gif follows


::=
Description of grantee_clause.gif follows


::=
Description of on_object_clause.gif follows

 
 
 
阅读(1143) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~