oracke控制用户权限

    xiaoxiao2021-12-14  22

    DBA使用create user创建用户

    CREATE USER user

    IDENTIFIED BY password;

    例子:

    create user zhouqi1 identified by 123456; --授予登入权限 grant create session to zhouqi1; --授予创表权限  grant create table to zhouqi1; --授予用户空间无限制,5M alter user zhouqi1 quota unlimited on users; alter user zhouqi1 quota 5m on users; --更改用户密码 alter user zhouqi1 identified by 654321;

    --创建角色并赋于权限  create root my_root; grant create session ,create table,create view to my_root; --授予角色给用户  grant my_root to zhouqi1; --授予用户zhouqi1查询,更新system用户中emp1表的权限 grant select,update on system.emp1 to zhouqi1; grant select on system.departments to zhouqi1; --授予所有用户都能查employees表 grant select ,update,delete on employees to public;

    --收回在system用户下的表departments查询权限  revoke select on departments from system;

    系统权限:create session等

    对象权限 :

    转载请注明原文地址: https://ju.6miu.com/read-970893.html

    最新回复(0)