创建某个用户: create  user xiaoming identified by abc(password);

权限分为:1、系统权限:用户对数据库的相关权限。

              2、对象权限:用户对其他用户的数据对象操作的权限。

 

对一个用户授权需要system或sys用户来对其他用户授权。一般授予用户某个角色。 常见的角色有:connect 、 dba 、resource。

若有小明用户,格式:grant connect to xiaoming;

若小明想要查询scott的emp表,则:

Grant select on emp to xiaoming;   select * from scott.emp;

收回权限:revoke select on emp from xiaoming;

 

对象权限授权的传递: 在后面加上 with grant option 

系统权限授权的传递: 在后面加上 with admin option

给用户解锁:alter user tea account unlock;

 

相关文章:

  • 2021-10-07
  • 2021-11-30
  • 2021-12-05
猜你喜欢
  • 2021-06-06
  • 2021-11-14
  • 2021-12-23
  • 2021-07-13
  • 2021-06-29
  • 2021-05-20
  • 2021-09-22
相关资源
相似解决方案