oracle学习记录之二
2011-11-26 17:39
363 查看
1.修改用户密码
passw; --修改自己的密码
alter user xiaoming identified by m1234; --需要管理员权限用户才能给别的用户改密码
2.授予用户连接到数据库及建表等权限
grant connect to xiaoming; --授予xiaoming连接到数据库权限,需要管理员权限。connect为角色包含多种系统权限
grant resource to xiaoming; --授予xiaoming建表等权限,需要管理员权限。resource为角色包含多种系统权限
3.建表
create table test(userID char(10), name varchar2(10));
4.授予别的用户对本身的增删改查等对象权限
grant select on emp to xiaoming; -- 对象权限有select、insert、update、delete、 all 等
revoke select on emp to xiaoming; --收回对象权限
grant connect to xiaoming with admin option; --使得小明可以将获得的connect授予其他用户
grant select to xiaoming with grant option;
注意: revoke具有株连特性。即若scott赋予xiaoming 其emp表的select权限,xiaoming再将select 赋予xiaohong。然后,scott收回xiaoming对其emp表的select权限,则xiaohong将不再具有select scott.emp的权限.
revoke仅对对象权限株连,系统权限不株连
passw; --修改自己的密码
alter user xiaoming identified by m1234; --需要管理员权限用户才能给别的用户改密码
2.授予用户连接到数据库及建表等权限
grant connect to xiaoming; --授予xiaoming连接到数据库权限,需要管理员权限。connect为角色包含多种系统权限
grant resource to xiaoming; --授予xiaoming建表等权限,需要管理员权限。resource为角色包含多种系统权限
3.建表
create table test(userID char(10), name varchar2(10));
4.授予别的用户对本身的增删改查等对象权限
grant select on emp to xiaoming; -- 对象权限有select、insert、update、delete、 all 等
revoke select on emp to xiaoming; --收回对象权限
grant connect to xiaoming with admin option; --使得小明可以将获得的connect授予其他用户
grant select to xiaoming with grant option;
注意: revoke具有株连特性。即若scott赋予xiaoming 其emp表的select权限,xiaoming再将select 赋予xiaohong。然后,scott收回xiaoming对其emp表的select权限,则xiaohong将不再具有select scott.emp的权限.
revoke仅对对象权限株连,系统权限不株连
相关文章推荐
- oracle学习记录之十五
- 学习oracle 入门第一课后的笔记记录
- Oracle学习记录1(单行函数,多行函数)
- Oracle学习记录2(多表查询)
- oracle学习之二--组函数
- Oracle-记录学习
- Oracle--SQL技巧之二(多行记录用逗号拼接在一起)
- oracle分析函数之rank学习记录
- oracle学习记录之十三
- Oracle学习记录1(单行函数,多行函数)
- Oracle学习记录2(多表查询)
- oracle创建触发器学习记录
- 【cocos2d-x】cocos2d-x学习笔记之二——相关网站记录
- Oracle学习记录——使用自定义函数和触发器实现主键动态生成
- oracle学习之二:oracle常用命令
- Oracle学习记录1(单行函数,多行函数)
- Oracle学习记录2(多表查询)
- ORACLE 表空间学习记录
- oracle学习记录之一
- 好记性不让烂笔头!oracle学习记录一!