`

安全管理

阅读更多
  • 安全管理
    1、oracle的安全管理体系
    oracle管理数据库安全的特点
    2、用户管理
    创建、修改用户、用户口令的维护,用户的授权
    3、角色管理
    角色的创建、授权
    4、配置文件的设置
    什么是配置文件,怎样使用配置文件

例子1:设置权限
grant select on scott.abc to test;//把表scott.abc授权给test
conn /as sysdba;
alter user test default tablespace test;
alter user test default tablespace users;
alter user test default tablespace tt;//设置用户test的表空间为tt

alter user test identified by test11;//修改用户test密码为test11
alter user test account lock;//锁定test用户
alter user test account unlock;//解除test用户的锁定

//创建用户
create user qqq identified by qqq123
default tablespace tt;
//授权连接
grant connect to qqq;
//授权用户可以授权表的快速查询
grant select on scott.abc to test with grant option;
//授权用户可以授权表的插入
grant insert on scott.abc to test with grant option;
//
grant execute on tt.proc01 to test;
//系统授权
grant drop user to test;//删除授权
drop user abc;//删除用户
grant create user to test with admin option;//超级用户权限
revoke select on scott.abc from test;//解除授权
revoke create user from test;//解除授权

 

例子2:角色管理
建立角色
*****************
create role myrole;
grant select on scott.e to myrole;
grant select on scott.d to myrole;
*****************
grant myrole to test;//授角色myrole给test用户

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics